PHOENIX -- Mike Yastrzemski never experienced a night like Friday. Not in his months in the major leagues, not in the minor leagues and not in Little League.
"Not even in video games," the 28-year-old Yastrzemski said.
For only the second time in major league history, teams combined to hit 12 home runs in a game. The Giants and Diamondbacks were one short of the record 13 homers hit by Arizona and Philadelphia on June 10 at Citizens Bank Park. It was a Chase Field record for the Diamondbacks, who hit five of their six on Friday after the seventh inning.
Yastrzemski also hit a solo homer in the third, and had a two-run blast in the seventh inning. His three-homer game was accomplished in 70 big league games. His Hall of Fame grandfather, Carl Yastrzemski, had one three-homer outing in 3,308 career games for the Boston Red Sox. The elder Yastrzemski hit three homers in a game against the Detroit Tigers at Tiger Stadium on May 19, 1974.
"Just don't let a good pitch to hit go by," Yastrzemski said of his thought process. "Didn't matter whether it's a fastball, slider, change-up, if it was a good pitch I wasn't going to let it hit the glove."
Kevin Pillar homered twice, with his second long ball giving the Giants a 9-7 lead in the 10th inning.
Brandon Belt also homered for the Giants, who have won five of six.
Yoan Lopez (1-5) took the loss after giving up Yastrzemski's home run to lead off the 11th.
The Diamondbacks lost their third straight and fell below .500 at 61-62. The Giants, 2½ games out of the second wild-card spot in the National League, have taken the first two games of the four-game set.
"It just shows how gritty this team is," Yastrzemski said. "Guys want to win and they want to be here and they want to play, and that's what makes it so fun to be part of a team like this."
Jones' first homer in more than two months tied the score at 7 in the eighth inning, as the Diamondbacks battled back from a 7-2 deficit. Jones hit a three-run shot as a pinch hitter with two outs.
"We slugged it out and ran out of outs," Diamondbacks manager Torey Lovullo said. "You feel like it was one of those games you want to keep playing the rest of the night until you come out of the right side of it."
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 gave up two runs and five hits in 5⅓ innings.
"A little home run derby going on tonight," Giants manager Bruce Bochy said. "But I'll say this, for those guys in there to win that ball game, a couple of leads there we let get away ... relievers have a tough day, but we picked them up."
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.
Leake gave up four runs and 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.
'I love it here, but it's still a business': Mookie Betts' future looms large in Boston
Boston's title defense is over and its front office is in flux. And with their biggest star approaching his walk year, the Red Sox have a ton of work to do this winter and beyond.
Cardinals-Cubs with a division title on the line: Breaking down the high-stakes showdown
It doesn't get much better than two of baseball's bitter rivals squaring off with a playoff spot up for grabs. We look at the matchup from both sides.
Law: Shane Bieber and four other players I was wrong about
A Belieber? Keith Law was not. Here's how Cleveland's breakout pitcher and other surprising stars have outperformed expectations.
The biggest surprises and disappointments of the 2019 MLB season
We knew the Yankees would hit a lot of home runs, but not DJ LeMahieu and Gio Urshela. The Phillies spent big but didn't cash in. Here are the top overachievers and the worst flops.
Twins face Royals, look to extend lead on Indians
The Minnesota Twins open their final home series of the season on Thursday night when they begin a four-game set with the Kansas City Royals at Target Field in Minneapolis.
Cubs host Cardinals with division on line
The ballpark always buzzes when the Chicago Cubs take on the rival St. Louis Cardinals.