MILWAUKEE - Pinch-hitter Travis Snider homered in the ninth inning to lift Pittsburgh to a 4-3 win over the Milwaukee Brewers on Tuesday night that clinched the Pirates' first non-losing record in 21 seasons.
Snider drove a 2-2 pitch from Jim Henderson (3-5) over the wall in center for his second pinch-hit homer of the season. He also accomplished the feat against the Chicago Cubs on May 21.
It was victory No. 81 for Pittsburgh, ensuring it will not finish with a losing record for the first time since it went 96-66 in 1992. More importantly, it boosted the Pirates' lead in the NL Central to two games over St. Louis.
Mark Melancon pitched the ninth for his 11th save, striking out Khris Davis with a runner on second to make it four straight wins for Pittsburgh at Miller Park for the first time since 2002. The Pirates lost 44 of 51 games in Milwaukee from 2007-2012.
Jean Segura had two hits and Jonathan Lucroy drove in two runs for Milwaukee, which has lost five in a row.
Pittsburgh went ahead 3-2 in the eighth. Andrew McCutchen walked with one out and raced around to third when newly acquired Justin Morneau followed with a perfectly executed hit-and-run single into left field. Marlon Byrd then hit an RBI double off Brandon Kintzler into the left-field corner.
Pinch-hitter Pedro Alvarez was intentionally walked to load the bases with two outs, and Kintzler got pinch-hitter Gaby Sanchez to fly out to end the threat.
Morneau, who was acquired in a trade with Minnesota on Saturday, had three hits. Byrd, who came over in last week's deal with the New York Mets, went 2 for 3 with two RBIs and has hit safely in six of his first seven games with Pittsburgh.
The Brewers rallied in the bottom half of the eighth against Mazzaro. Pinch-hitter Caleb Gindl walked, advanced on a groundout and scored on Jean Segura's base hit.
Yovani Gallardo pitched seven solid innings for Milwaukee, allowing two runs and five hits. The right-hander, who threw seven shutout innings at Pittsburgh in his previous start, is 11-4 with a 2.59 ERA in 20 career appearances against the Pirates.
McCutchen went deep with two out in the first for his 18th homer of the season and No. 100 for his career. But Milwaukee responded with two runs against Gerrit Cole in the bottom half on Lucroy's two-run single to right.
Cole gave up two runs and five hits over six innings. He struck out five and walked one.
Game notes: Pittsburgh activated closer Jason Grilli from the disabled list. The 36-year-old right-hander had been on the DL since straining the right flexor tendon in his pitching arm during a 6-5 victory over Washington on July 22. He had been on a rehab assignment in the minors before being recalled. Manager Clint Hurdle said Grilli will make a couple of relief appearances in non-save situations before resuming his role as the closer. He made the All-Star team for the first time this season and was second in the NL with 30 saves at the time of his injury. ... The Pirates recalled RHP Jared Hughes, OF Andrew Lambo, LHP Jeff Locke and C Tony Sanchez from Double-A Altoona. ... The Brewers recalled 1B/OF Sean Halton and RHP Johnny Hellweg and selected the contract of RHP Jimmy Nelson from Triple-A Nashville. ... The Pirates have homered 12 times in their last 12 games. ... McCutchen is the sixth player in team history to hit at least 100 home runs and steal at least 100 bases in his career.