Freddy Galvis drove in the go-ahead run in a four-run ninth inning with San Diego's second successful squeeze bunt of the game, and the Padres rallied to beat the Pirates 8-5 Sunday for their third win of the four-game series.
Pittsburgh had a 5-4 lead into ninth when Jose Pirela and Christian Villaneuva singled off Felipe Vazquez (2-1).
Franchy Cordero pinch ran for Villaneuva and pinch-hitter Cory Spangenberg fouled off a pair of bunts, then fouled off four straight pitches. On the ninth pitch of the at-bat, Spangenberg grounded to shortstop Jordy Mercer, whose wide throw hit off the glove of second baseman Josh Harrison for an error as Pirela came home with the tying run.
Galvis bunted a chopper to Vazquez, who hesitated on his throw to first and then bounced it as Galvis reached with a single. After a double steal, A.J. Ellis hit a two-run single.
''We did a really good job in that ninth inning with Franchy running at third base and Freddy getting it down,'' Padres manager Andy Green said. ''Sometimes you just put pressure on defense and good things happen.''
Pitcher Jordan Lyles had squeezed in a run to give the Padres a 4-1 lead in the fifth.
Vazquez blew a save for the first time in 10 chances.
''Today was just kind of a rough day,'' Vazquez said. ''Just move forward, forget about what happened today and forget about this series.''
San Diego built its early lead on Villanueva's two-run homer in the fourth and a two-run fifth that included Manuel Margot's RBI groundout. Those four runs came on just four hits allowed by Trevor Williams in his six innings.
Pittsburgh tied the score in the sixth when Austin Meadows and Mercer homered on consecutive pitches. Meadows' first big league homer was a two-run drive.
Lyles allowed four runs and seven hits in 5 2/3 innings.
''Just ran into a buzzsaw that last inning, in the sixth,'' Lyles said. ''I made a decent pitch, the curveball, and (Meadows) put a good swing on it. After that, started pounding the zone again to Mercer and left it over the plate.''
Kirby Yates (3-0) allowed a go-ahead sacrifice fly in the eighth to Harrison, who had three hits in his return from the disabled list. Harrison had been out with a broken left pinkie sustained when he was hit by a pitch from Miami's Jose Urena on April 15.
Brad Hand worked around a pair of walks in the ninth for his 13th save in 15 chances.
Right-hander Nick Kingham was optioned to Triple-A Indianapolis to open a roster spot for Harrison. The 26-year-old Kingham is 2-1 with a 3.44 ERA in three starts.
Padres: LHP Joey Lucchesi (hip strain) has thrown from 90 feet but will not be activated when eligible to come off the DL on Friday.
Pirates: RHP Joe Musgrove (right shoulder strain) has completed his rehab is expected to make his 2018 big league debut Friday against St. Louis. He'll be replacing Kingham in the rotation. ... CF Starling Marte (right oblique strain) said he doesn't expect to be out long. Marte is eligible to return from the disabled list on Saturday.
Padres: LHP Robbie Erlin (1-2, 3.46 ERA) is expected to make his second start of the season Monday in Washington. Erlin has made 13 of his 14 appearances out of the bullpen.
Pirates: RHP Jameson Taillon (2-3, 3.97 ERA) is slated to open a three-game series in Cincinnati on Tuesday. He is 0-3 in his last seven starts.
More AP baseball: https://apnews.com/tag/MLBbaseball
Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.