PHILADELPHIA (AP) — Hunter Pence singled in the go-ahead run after Carlos Ruiz hit a tying, three-run double and the Philadelphia Phillies rallied with six runs in the eighth inning to beat the Milwaukee Brewers 7-6 on Tuesday night.

A night earlier, the Phillies scored four runs in the ninth off Francisco Rodriguez to beat Milwaukee by the same score.

READ MORE: 14-Year-Old Boy Shot Nearly 20 Times, Killed While Waiting For SEPTA Bus In North Philadelphia, Police Say

The Brewers wasted a sensational outing by Zack Greinke, who outpitched and homered off Cliff Lee.

Greinke allowed one run and three hits, striking out five. He retired the last 14 batters he faced, but left after seven innings with the Brewers up 6-1 only to see them lose their season-worst fifth straight.

Pinch-hitter Eric Kratz got the Phillies started in the eighth with a two-run homer off Manny Parra to cut it to 6-3. Shane Victorino, Chase Utley and Ryan Howard worked consecutive two-out walks to load the bases.

Kameron Loe (4-4) entered to face Ruiz, who ripped a 1-2 pitch to the gap in left-center to clear the bases. Pence followed with a looping RBI single to right.

The last-place Phillies suddenly seem like the team that has won five straight NL East titles. They have won three straight, including consecutive walkoff wins.

Still, the Phillies entered the night 10 games behind in the wild-card race.

Michael Schwimer (1-1) pitched a scoreless eighth to earn the win. Jonathan Papelbon finished for his 22nd save in 25 tries.

With several scouts watching, Greinke showed he can certainly help a contender down the stretch if the Brewers decide to deal him before the July 31 non-waiver trade deadline rather than risk losing him in free agency after the season.

The 2009 AL Cy Young Award winner was scratched from his last start because of fatigue after pitching three straight games around the All-Star break. But he proved he doesn’t have a tired arm, consistently throwing his fastball in the low 90s and reaching a high of 94 mph.

READ MORE: Police Investigating 'Suspicious' Deaths Of 2 Men Found In Box Truck In Northeast Philadelphia

Ryan Braun, Carlos Gomez and Aramis Ramirez also hit homers off Lee.

Lee gave up six runs and 12 hits in seven-plus innings. It’s unfathomable that Lee, who is earning $21.5 million this season, has one win in 17 starts.

It hasn’t been entirely Lee’s fault, though. The 2008 AL Cy Young Award winner hasn’t received much run support and couldn’t even win a game in which he threw 10 scoreless innings in April. The Phillies have scored three runs or fewer in 12 of his 17 starts.

The offense bailed him out this time.

Braun ripped his NL-leading 27th homer over the ivy-covered brick wall in center to give the Brewers a 2-1 lead in the sixth.

Greinke connected in the seventh, driving his third career homer out to left.

Gomez hit one way out off the facade of the second deck in left in the eighth. Ramirez ended Lee’s night with a two-run shot later in the inning.

Lee struggled at the start, allowing four hits and a run in the first. He retired 10 straight batters before Martin Maldonado started the fifth with an infield single. The Brewers loaded the bases with one out, but Lee picked Maldonado off third base and struck out Gomez to end the inning.

(© Copyright 2012 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)

MORE NEWS: Crash Involving Tractor-Trailer, SUV Closes Route 130 North In Burlington County