PITTSBURGH -- Andrew McCutchen gave the Pittsburgh Pirates something rare Tuesday night -- a win over the Milwaukee Brewers.
McCutchen led off the bottom of the 12th inning with a home run off Mike Fiers to give the Pirates a 4-3 victory at PNC Park. The Pirates had lost 10 of their previous games to the Brewers, including their last five at home.
McCutchen hit a 2-2 pitch from Fiers (0-2) over the center-field fence for his fifth home run of the season. It was also the fourth walk-off homer of McCutchen's five-year career.
Jose Tabata had three hits for Pittsburgh, Russell Martin hit a pair of doubles and Neil Walker had two hits. The Pirates won for the fourth time in their last five games.
Vin Mazzaro (2-0) pitched two scoreless innings for the win.
The Brewers fell to 2-10 in May.
Milwaukee got three hits from Ryan Braun, who doubled twice, while Norichika Aoki and Carlos Gomez added two each. Jean Segura had two RBIs.
Neither starting pitcher figured in the decision.
Milwaukee's Kyle Lohse worked an uneven 5 2/3 innings, allowing two runs on five hits and five walks. He struck out three.
Pittsburgh's Jeff Locke gave up six runs and seven hits in six innings with one walk and six strikeouts.
The Pirates tied the game 3-3 as Walker led off and scored in both the sixth and eighth innings.
In the sixth, Walker drew a walk, took third on a double by Martin and scored on Clint Barmes' ground out. Walker singled to start the eighth then scored from first on Martin's double into the right-field corner.
Pittsburgh had a chance to win the game in the bottom of the ninth but Alfredo Figaro got Garrett Jones to hit into an inning-ending double play after Tabata hit a one-out double and McCutchen was intentionally walked.
Jean Segura, who entered the day leading the National League with a .368 batting average, hit a solo home run in the top of the first inning to open the scoring. Segura's seventh home run of the season came hours after reports surfaced that the Brewers and his agent had engaged in preliminary talks on a long-term extension.
The Pirates countered with a run in the bottom of the first as Starling Marte led off with a single and eventually scored on Garrett Jones' groundout.
Ryan Braun hit a leadoff double off the glove of third baseman Pedro Alvarez in the Milwaukee fourth and scored on Carlos Gomez's double over the head of right fielder Tabata.
The Brewers made it 3-1 in the fifth when Norichika Aoki lined a single off starting pitcher Jeff Locke's leg, advanced to third base on back-to-back wild pitches and scored on a Segura groundout.
NOTES: Braun returned to the lineup after sitting out Monday's game with stiffness in his upper back and neck. ... 2B Rickie Weeks was also back in the Brewers' lineup after not starting Monday for the first time all season as manager Ron Roenicke wanted to give him a break. ... C Russell Martin was behind the plate for Pittsburgh after sitting out four straight games and six of the previous seven with a stiff neck. ... RHP Yovani Gallardo (3-2, 4.70) starts Wednesday night for Milwaukee against LHP Wandy Rodriguez (3-2, 3.62). Gallardo is 10-2 lifetime against the Pirates and has won his last seven decisions against them.