Diamondbacks 9, Giants 7 (11 innings)
SAN FRANCISCO -- Jean Segura's infield single plated Phil Gosselin with the go-ahead run in the 11th inning, and the Arizona Diamondbacks fought back from three deficits to beat the San Francisco Giants 9-7 Monday night.
Jake Lamb tied the game in the ninth inning with a two-out, two-strike home run that just cleared the right field barrier. He added an RBI double in the 11th.
Angel Pagan collected three hits and drove in a pair of runs for the Giants, who lost their sixth in seven games.
Denard Span tripled leading off the eighth inning and scored on a wild pitch to give the Giants a 7-6 lead heading into the ninth.
Santiago Casilla gave up Lamb's homer to blow the save opportunity. He is stuck at 99 career saves.
Welington Castillo had a pair of hits, including a home run, and drove in two runs for the Diamondbacks, who won their third in four games.
Rubby De La Rosa (1-3), originally scheduled to start the game, came on in the 10th-inning, striking out three and walking a batter.
Brad Ziegler worked the bottom of the 11th to record his third save and his 21st consecutive scoreless outing against San Francisco, the longest all-time against the Giants.
Chris Heston (1-1) allowed two runs while recording just two outs in the 11th.
Daniel Hudson got Joe Panik to pop up to the infield following Span's triple but then unleashed a pitch that bounced a few feet in front of Castillo and ricocheted off the catcher's body to the backstop, allowing Span to score standing up.
Hudson pounded his glove in frustration before striking out Buster Posey and getting Hunter Pence to pop out to end the inning. It was the first run he allowed this year.
The Diamondbacks scored twice in both the sixth and eighth innings to tie the game at 6. David Peralta tripled to plate one run and scored on Yasmany Tomas' infield groundout in the sixth, and Castillo and pinch hitter Rickie Weeks hit back-to-back sacrifice flies in the eighth.
Giants starter Jake Peavy lasted two batters into the sixth inning, allowing four runs on seven hits. He did not walk a batter and struck out two.
Arizona starter Archie Bradley went 4 1/3 innings in his first major league appearance of the season had to work hard to keep the game close, escaping a couple of tough situations before tiring. He gave up five runs on seven hits, walked four and struck out a pair.
The Diamondbacks squandered an opportunity for a big inning and the Giants wasted a golden opportunity, both in the first inning.
Arizona loaded the bases with no outs in their half of the opening frame, but scored once -- on David Peralta's double-play grounder.
The Giants also loaded the bases on two walks and a hit and did not score. Span walked to lead off the inning and was thrown out trying to steal.
San Francisco grabbed a 2-1 lead in the second. Peavy scored on a wild pitch and Span singled in a home.
Castillo's 400-foot home run to straightaway center tied the game in the fourth and Panik's third homer of the year, a solo shot in the fifth, helped the Giants regain the edge at 3-2.
Panik's homer was the first off a Diamondbacks pitcher in AT&T Park since last April 19, a span of eight games.
Bradley was lifted after Brandon Belt singled with one out in the fifth. Bradley needed 105 pitches to get to that point.
Diamondbacks reliever Randall Delgado couldn't stop the flood, walking Peavy with the bases loaded and giving up a two-run single to Pagan as the Giants grabbed a 5-2 lead after five.
When Goldschmidt was hit by a pitch in the first, it meant he reached base against the Giants in 19 of his last 20 games against them.
NOTES: RHP Tyler Wagner was recalled from Triple-A Reno as the Diamondbacks added a 13th pitcher. ... OF Socrates Brito was optioned to Reno to make room for Wagner. ... INF Matt Duffy was given the day off by Giants manager Bruce Bochy so he could "work on things." He will return to the lineup Tuesday. ... INF Kelby Tomlinson filled in for Duffy, and he likely will remain in the lineup in the outfield the rest of the series as Bochy looks to give OFs Angel Pagan and Hunter Pence a break over the next couple of days. ... Giants INF Ehire Adrianza may get a cast for his injured foot to keep him from moving it at all.