Away from the cramped quarters of Miller Park, Wandy Rodriguez got his revenge.

Rodriguez, three starts removed from a poor outing on the road against the Milwaukee Brewers, shut them down with seven strong innings in the Pirates' 3-1 win Wednesday night at PNC Park.

Rodriguez (4-2) scattered six hits, three for extra bases, over seven innings, but limited a Brewers team that he has struggled against in the past to one run. He struck out five and walked one.

Rodriguez had a 4.14 ERA in 25 career games against the Brewers and had his worst start this season in a seven-run, 42/3-inning outing April 29 at Miller Park.

"He battled from start to finish," manager Clint Hurdle said. "Good three-pitch mix. The curveball, the changeup, the fastball to both sides, very aggressive."

The Brewers sent seven right-handed position players to the plate against Rodriguez. Only right fielder Norichika Aoki batted from the left side among the starting position players.

The Pirates, by contrast, started seven right-handers and switch-hitting Neil Walker against right-hander Yovani Gallardo. Hurdle sat Pedro Alvarez, 0 for 15 against Gallardo, and Clint Barmes, 1 for 17 against Gallardo, and started Brandon Inge and Jordy Mercer in their place.

Gaby Sanchez also started instead of Garrett Jones, who is 5 for 21 with eight walks against Gallardo; Hurdle had said Tuesday that he anticipated Jones would start against the remaining right-handers in the series against the Brewers.

"We haven't had a lot of lineups that have had a lot of success, so we threw all right-handers against him with the exception of Neil," Hurdle said.

Gallardo confounded that lineup through five innings, but he cracked in the sixth. He had walked five batters in his previous start, and two walks in the sixth helped the Pirates to break the scoreless tie.

Starling Marte led off with a double and took third on a wild pitch. Gallardo walked Andrew McCutchen and Sanchez to load the bases for Walker. Gallardo started Walker with an off-speed pitch over the outside corner.

"I know that when he gets in trouble, he likes to run to that little cutter-slider to get ahead," Walker said.

Walker stroked it up the middle, scoring Marte and McCutchen. Alex Gonzalez cut off Carlos Gomez's throw from center, which likely had a shot at McCutchen at the plate, and threw out Sanchez trying to go from first to third.

"You know you got the guy on the ropes there, especially with less than two outs and the bases loaded," Walker said. "You know he's got to come to you."