MILWAUKEE -- Brewers first baseman Corey Hart and his teammates had seen the Brewers bullpen give up leads many times this season as they did again Saturday.

But Hart did something about it this time as he led off the ninth inning with his 26th home run of the season to lift the Brewers to a 3-2 win over the Pittsburgh Pirates.

Hart hit the second pitch he saw from Pirates closer Joel Hanrahan (4-1) into the Brewers bullpen in left field. It was his third career game-ending home run.

"You can't get down," Hart said. "We've had a lot of tough luck this year. Our guys are out there battling and we just have to stay in the game and do what we can to win."

And winning is what the Brewers have been doing lately. The victory was the Brewers second straight over the Pirates and the team's 10th win in its last 12 games.

"A lot of people counted us out a long time ago," Hart said. "But we think we have a pretty good club and we're making a nice little run. Other people are starting to notice us all of a sudden."

Hanrahan said he the pitch to Hart was a hanging breaking ball.

"The guys battled their butts off and I come in and throw two pitches and the game is over," he said.

Marco Estrada gave up one run on four hits and struck out 10 in seven innings for Milwaukee. He has given up just one earned run in his last three starts. Estrada got out of a major jam in the sixth inning. With the bases loaded, Estrada struck out Pedro Alvarez looking after Alvarez fouled off four pitches on a 3-2 count.

Estrada said he was thrilled to win the battle with Alvarez, which he called one of the toughest of his career.

"He kept fouling balls off," he said. "It was tough, but I knew I just had to keep the ball down and get him out."

Brewers manager Ron Roenicke said Estrada pitched very well, keeping the Brewers in the game until Hart could win it in the end.

"He really did a nice job tonight," Roenicke said.

John Axford (5-7), who got out of a bases-loaded jam in the top of the ninth inning by striking out Alex Presley, got the win for the Brewers.

The Pirates lost for the ninth time in the last 12 games as Pittburgh continues to try to stay in the National League Wild Card playoff race.

A.J. Burnett took a no-hitter into the sixth inning for the Pirates before giving up a two-out bloop single to Rickie Weeks. He came back to strike out Ryan Braun to end the inning.

Burnett pitched 6 2/3 innings, giving up two runs and two hits. He had nine strikeouts and four walks. It was a nice bounce back for Burnett, who had struggled in recent starts. The Pirates had lost three of his last four starts and he had recorded a 6.29 ERA over those four games.

Pirates manager Clint Hurdle said his team was done in by 14 strikeouts.

"We have plenty of opportunities," he said. "Unfortunately, we've had some games like that this season."

The Pirates grabbed a 1-0 lead in the second inning as Alvarez hit his 27th home run of the season.

The Brewers tied the score at 1-1 in the third inning without getting a hit. Carlos Gomez walked, stole second and third base and then scored on a wild pitch.

The Brewers grabbed the lead in the seventh inning 2-1 on Gomez's RBI double.

Pittsburgh tied the game in the eighth inning off of Brewers reliever Jim Henderson. Pinch hitter Brock Holt walked and advanced to second on a sacrifice. With two out, Andrew McCutchen hit a broken bat single to right field to score Holt. It was the Brewers' 26th blown save of the season.

Game notes
Brewers manager Ron Roenicke said rookie RHP Mark Rogers would be shut down for the rest of the season. Rogers, who has a 3-1 record with a 3.92 ERA, was the winning pitcher in the Brewers 9-3 win Friday. ...The Pirates added catcher Eric Fryer, LHP Jeff Locke, LHP Justin Wilson, RHP Chris Leroux and Holt to their roster from Triple A Indianapolis. ... McCutchen did not hit a home run, breaking a streak of four consecutive games with a home run at Miller Park.