PITTSBURGH -- Yovani Gallardo was pitching so well he just needed one run to get a win. His catcher got him all the support he needed, with some help from an eager fan.
"Yo was outstanding," Brewers manager Ron Roenicke said. "Just hung in there and made some great pitches, got better as the game went on."
Gallardo (4-4) had a season-high eight strikeouts in his second win in his last three starts. He allowed four hits and walked one.
The Pirates had at least one baserunner in five of Gallardo's seven innings, but the right-hander got sharper as the game progressed.
"I was able to get out of some big situations and make pitches," Gallardo said. "That's always something positive to go from."
Pittsburgh also put right-hander Gerrit Cole on the 15-day disabled list with shoulder fatigue.
Locke (0-1) struck out five and walked one in his second start of the season. The left-hander, who made the All-Star team last season, allowed six runs and eight hits in 5 1-3 innings against San Francisco on May 5.
"He gave us everything we could have asked for him to give us today," manager Clint Hurdle said. "And more."
Locke said he benefited from being "on the same page" with catcher Russell Martin.
"We just knew I was going to pitch my game," he said. "He just put down the right fingers and moved the ball around a little bit."
Lucroy sparked the only scoring sequence of the game when he led off the seventh with a liner down the left-field line that was grabbed by a fan while it was in play. Lucroy was awarded a ground-rule double on the interference.
Lucroy went to second on Carlos Gomez's lineout to center and scored on Ramirez's bouncer to first.
Pittsburgh left 10 runners on base in its 10th loss in 13 games this season against NL Central-leading Milwaukee. Martin and Hurdle also were ejected in the eighth.
With two out and Andrew McCutchen on third, Martin looked a called third strike on a curveball from Francisco Rodriguez on the lower-inside edge of the plate. Martin spiked his bat and helmet in the batter's box. Hurdle then confronted umpire Ed Hickox about the call and was thrown out.
Roenicke said he thought the pitch looked questionable based on the way his catcher reacted to it.
"(Lucroy) made that pitch look a little not-as-good-as it probably was," Roenicke said. "Just because he was maybe in between trying to block or decide where the ball was going to end up."
Lucroy said he did not think the pitch was a strike.
The Pirates then put runners on first and second in the ninth, but Rodriguez got Travis Snider to hit into a fielder's choice that advanced Starling Marte to third and retired Harrison for his 19th save.
"I ended up making the right pitches to get out of (the jam)," Rodriguez said. "So it's definitely a nice win."
Lucroy had three hits and improved his batting average to .335, third-best in the National League. ... Morton (2-7, 3.31 ERA) got an extra day of rest and will pitch against Chicago on Monday. ... Milwaukee RHP Marco Estrada (5-2, 4.19 ERA) starts when the Brewers begin a three-game series with the Mets on Tuesday.