MILWAUKEE (AP) -- Rickie Weeks broke out of a season-long slump with a three-run homer and five RBIs to lead the Milwaukee Brewers over the Pittsburgh Pirates 12-8 on Tuesday.
Weeks finished with three hits for the Brewers, who won their ninth straight against Pittsburgh. They improved to 46-7 at Miller Park vs. the Pirates since the start of 2007, the best home record by any team against a division opponent during that stretch.
Andrew McCutchen homered and had four hits for Pittsburgh, which fought back from a 7-3 deficit to grab an 8-7 lead on Starling Marte's three-run homer in the sixth inning. The hit initially was ruled a double, but umpires overturned the call after a video replay.
Jean Segura led off the bottom half with his third home run of the season.
After Tom Gorzelanny (1-0) escaped a two-on, none-out jam in the seventh, Yuniesky Betancourt lined his sixth home run of the year off Pirates reliever Bryan Morris (0-1), who was just called up from the minors.
Weeks, who began the night batting .167, hit his second homer of the season in the eighth inning to seal it. Coming into the game, he had four RBIs all year and only seven hits in his last 72 at-bats.
Brewers starter Marco Estrada went five innings, giving up five runs and seven hits.
James McDonald started for Pittsburgh, allowing seven runs and eight hits in five innings.
The Pirates grabbed a 1-0 lead in the first on McCutchen's RBI single.
Milwaukee went up 3-1 in the second. After Weeks and Carlos Gomez walked, Martin Maldonado lined a two-run double. Estrada followed with a single that got past right fielder Garrett Jones for an error that allowed Maldonado to score.
Gaby Sanchez's two-run homer in the third tied the score. Gomez's RBI double in the bottom half gave Milwaukee a 4-3 lead.
The Brewers made it 7-3 in the fourth on Jonathan Lucroy's RBI double and Weeks' two-run single.
Russell Martin and McCutchen hit back-to-back home runs in the fifth for Pittsburgh to cut it to 7-5.
NOTES: Before the game, the Pirates recalled Morris from Triple-A Indianapolis and designated LHP Jonathan Sanchez for assignment. ... Marte's double to start the game made him 6 for 7 with two walks leading off the first inning in the last nine games. He leads the majors with a .666 batting average in the first inning. ... With a game-time temperature of 81 degrees, Miller Park's roof was open for the first time this season.