PITTSBURGH -- Yovani Gallardo returned from the disabled list and pitched like an ace at a time when the Milwaukee Brewers needed one.
Prince Fielder and Rickie Weeks both hit a home run for the second time in the series for the Brewers, who allowed a combined 26 runs in losing the previous two games.
"Six shutout innings coming off the DL, particularly against a team that just went out and crushed us the last two days. ... It was good news for us," Milwaukee manager Ken Macha said.
Gallardo (9-4), named to his first All-Star Game the day he sustained a left oblique strain in St. Louis on July 4, did not allow a runner to advance past second base. He gave up five hits and a walk, striking out five.
"That's what Yo does," Weeks said. "Then again, coming off the DL, you expect a little rust, but he came out firing on all cylinders. That helped us out a lot."
Gallardo rescued what had been a four-day stretch of historically bad Milwaukee starting pitching. During three of the previous four games, a Brewers starter had allowed 10 runs or more -- the first time that had happened since three St. Louis Browns pitchers did it in over a four-day span in 1937, according to the Elias Sports Bureau.
Gallardo has won nine of his past 11 decisions and improved to 6-1 with a 1.80 ERA with 69 strikeouts in 60 innings in 10 career starts against the Pirates.
Pittsburgh, which had scored 48 runs in winning four of its previous five, was limited to a two-run double by Neil Walker in the seventh off Todd Coffey.
"We knew coming into the series they were swinging the bats pretty good and we'd have to make quality pitches," Gallardo said. "Especially watching yesterday; they came out swinging.
"I threw the ball pretty well today. I was trying to stay on the rhythm I had before the All-Star break. It had been a couple weeks, and I was able to do that tonight."
Three days after starting and winning for the first time in three years, Chris Capuano got Garret Jones to ground out weakly to end a threat in the seventh, and he recorded the first out of the eighth. John Axford retired the final five Pirates for his 13th save in as many opportunities.
"We just needed four tonight, and we couldn't push across a couple extra ones," Walker said.
Walker and Jones both had two hits for the Pirates. Rookie Pedro Alvarez, who had hit two home runs in each of the two previous games, went 0 for 4.
Fielder led off the fourth by hitting a 2-2 pitch from Ross Ohlendorf (1-8) into the seats in right field to take over sole possession of the National League home run lead with 24.
One at bat after getting hit by a pitch for the majors-high 18th time, Weeks hit a two-run shot to center off All-Star Evan Meek following Carlos Gomez's pinch-hit single in the seventh.
After lasting 1 1/3 innings in his previous start, Ohlendorf allowed one run, five hits and a walk with one strikeout in six innings.
Jonathan Lucroy and Alex Escobar both had two hits for the Brewers.
Both benches were warned by home plate umpire Mike Muchlinski when Coffey nearly hit Jose Tabata with a pitch on a 3-0 count in the seventh inning.
One batter on each team had been hit previously in the game. The Brewers last weekend were involved in similar situation against the Braves in a series at Atlanta, and they lead the NL in times hit by pitch.
"Absolutely," Pirates manager John Russell said when asked if there was intent by Coffey to hit Tabata, and Walker agreed.
"But I thought we responded real well by scoring two runs right after," Russell added.
Tensions flared further when the 268-pound Fielder was out upon raising his forearm while colliding with Pirates catcher Erik Kratz to end the eighth.
"It was a little old school out there," Macha said.
Walker has six consecutive multi-hit games, batting .593 over that span. ... Pirates OF Lastings Milledge went 0 for 4, which snapped his nine-game hitting streak. ... Weeks leads the majors in home runs and RBI by a leadoff hitter.