PITTSBURGH (AP) - 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 Pittsburgh Pirates 8-5 Sunday for their third win of the four-game series.
Pittsburgh took a 5-4 lead into the ninth, but Jose Pirela and Christian Villaneuva singled off Felipe Vazquez (2-1), who blew a save for the first time in 10 chances this season.
Franchy Cordero pinch ran for Villaneuva, and Cory Spangenberg fouled off a pair of bunts, took a ball, then fouled off four straight pitches. He grounded the ninth pitch of the at-bat to shortstop, and Jordy Mercer's throw was wide and went off the glove of second baseman Josh Harrison for a throwing error as Pirela scored the tying run.
Galvis bunted a chopper to Vazquez, who hesitated on his throw to first and then bounced it, allowing Galvis to reach with a single. After a double steal. A.J. Ellis hit a two-run single.
Pitcher Jordan Lyles had squeezed in a run for a 4-1 lead in the fifth.
Kirby Yates (3-0) allowed a go-ahead sacrifice fly in the eighth to Josh 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.
Lyles allowed four runs and seven hits in 5 2/3 innings. Pirates starter Trevor Williams gave up four runs and four hits in six innings.
San Diego built a 4-1 lead, boosted by Villanueva's two-run homer in the fourth and a two-run fifth that included Manuel Margot's RBI groundout.
Pittsburgh tied the score in the sixth when Austin Meadows and Mercer homered on consecutive pitchers. Meadows' first big league homer was a two-run drive.