PHOENIX (AP) — Mike Yastrzemski hit three home runs, including a tiebreaking solo shot in the 11th inning, and the San Francisco Giants recovered after squandering two late leads, beating the Arizona Diamondbacks 10-9 Friday night.
For just the second time in major league history, the teams combined to hit 12 home runs. The Phillies and Diamondbacks combined for 13 earlier this season.
On Friday, the Diamondbacks hit five of their six homers after the seventh inning.
Yastrzemski had solo homers in the third and 11th, and hit a two-run blast in the seventh inning.
Kevin Pillar homered twice, with his second long ball giving the Giants a 9-7 lead in the 10th inning.
The Diamondbacks countered with home runs by Wilmer Flores, his second of the game, and Nick Ahmed off Giants closer Will Smith, sending the game to the 11th inning.
Smith (5-0) picked up the win despite blowing a save chance. He worked 1 2/3 innings. Trevor Gott got Christian Walker to ground out for the game's final out and earned his first career save.
Brandon Belt also homered for the Giants, who have won five of six.
Adam Jones, Ketel Marte and Eduardo Escobar homered for Arizona. Escobar hit his team-leading 28th.
Yoan Lopez (1-5) took the loss after giving up Yastremzki's home run to lead off the 11th.
The Diamondbacks lost their third straight and fell below 500 at 61-62. The Giants have taken the first two games of the four-game set between teams with National League wild-card implications on the line.
Jones' first homer in more than two months tied the game at 7 in the eighth inning, as the Diamondbacks battle back from a 7-2 deficit. Jones hit a three-run shot as a pinch-hitter with two outs.
Arizona got the tying run on base when Marte singled to start the bottom of the 11th. But Smith struck out David Peralta and got Escobar to pop out before Gott entered and closed out the game.
Giants starter Jeff Samardzija allowed two runs on five hits in 5 1/3 innings.
The Diamondbacks took a 1-0 lead when Marte homered to open the bottom of the first. It was Marte's 25th of the season and third leadoff homer of the season and his career.
Belt and Yastrzemski took Diamondbacks starter Mike Leake deep in the third inning. Pillar's home run sailed into the left field seats, scoring Scooter Gennett, who had singled with one out.
Leake gave up four runs on eight hits in six innings.
Giants: RHP Johnny Cueto is scheduled for another start with Class A San Jose next week, as he moves closer to a possible return from Tommy John surgery.
Diamondbacks: Peralta banged his left (throwing) hand making a difficult catch in foul territory against the left field fence to end the top of the third inning, but stayed in the game.
Giants: Top prospect Logan Webb is set for his major-league debut Saturday against Arizona. Webb, 22, has pitched at the rookie, Class A, Double-A and Triple-A levels this season. He was suspended for 80 games earlier this year for testing positive for a performance-enhancing drug.
Diamondbacks: RHP Taylor Clarke was named Saturday's starter before Friday's game, in place of Merrill Kelly, who was moved to Sunday. Clarke is to be officially called up from Triple-A Reno, and is 4-3 with a 5.46 ERA in 13 starts with the Diamondbacks this season.