PHOENIX (AP) Arizona manager Chip Hale has confidence in the three pitchers at the back of his bullpen, sending Daniel Hudson, Tyler Clippard and Brad Ziegler into any situation without hesitation.
It was Hudson's turn Saturday night and it did not go well.
San Francisco loaded the bases against Hudson in the ninth inning and Buster Posey hit a two-run double for the go-ahead runs, lifting the Giants to a 5-3 win over the Diamondbacks.
''The ninth inning was a tough one,'' Hale said.
San Francisco led 3-1 after Jake Peavy's six strong innings, but the bullpen couldn't hold the lead.
Jean Segura pulled the Diamondbacks within one on an RBI groundout in the seventh inning and pinch hitter Phil Gosselin tied it with a sacrifice fly in the eighth off Hunter Strickland (1-0).
After the Giants loaded the bases in the ninth, Posey bounced a ground-rule double into the pool deck in right center, causing Hudson (1-1) to scream into his glove.
Posey entered the game hitting .143 with two outs and runners in scoring position and had the first hit in 29 at-bats by right-handers against Hudson this season.
''The silver lining with some of our struggles with runners in scoring position is they usually get back to who they are, it balances out,'' Giants manager Bruce Bochy said. ''That's a huge hit against a tough pitcher.''
The Giants had 12 hits, four by Denard Span, who is 8 for 17 on the road trip so far. Cory Gearrin pitched the ninth with Santiago Casilla needing a rest day, working around a single in the ninth for his first save.
Peavy, the 2007 NL Cy Young Award winner, got off to a slow start this season, allowing at least four runs in five of his seven starts for an 8.47 ERA.
He had a decent outing his previous start and overcame a bout with a stomach bug the night before to pitch well against the Diamondbacks.
Peavy gave up a run-scoring to double to Owings in the second inning, but limited the damage by stranding runners at second and third. He struck out five and walked two.
''Really, he backed off a little, didn't put as much effort into it, really had a smooth delivery going,'' Bochy said. ''The ol' less is more and it worked for him.''
Patrick Corbin carried a 15-inning scoreless streak against the Giants into Saturday's game - dating to July 19 - but that ended quickly with Joe Panik's run-scoring single in the first.
Pence has enjoyed hitting against the Arizona left-hander, entering Saturday's game hitting .476 with three homers and seven RBIs lifetime against him.
Pence got to Corbin again in the fourth inning, digging out a low pitch and hitting it off the top of the left field wall for a two-run homer to put the Giants up 3-1.
''I thought it was a good pitch,'' said Corbin, who allowed three runs on nine hits and struck out four in 6 1/3 innings. ''He seems to do that off me.''
The Diamondbacks have ground into eight double plays this series, one short of the team record set twice. ... Gearrin's save was his second career, with May 20, 2013 against Minnesota. ... Arizona's Paul Goldschmidt ended an 0-for-11 streak with a single in the eighth inning and scored on Gosselin's sacrifice fly.
Giants: RHP George Kontos (right flexor strain) joined the team after pitching consecutive games with Triple-A Sacramento and is expected to be activated in San Diego next week.
Diamondbacks: OF David Peralta was expected to start hitting off a tee to test out a sore right wrist has kept him out of the past six games.
Giants: RHP Matt Cain is 0-5 with a 6.69 ERA heading into Sunday's series finale against Arizona.
Diamondbacks: RHP Rubby De La Rosa, Sunday's starter, is 4-1 with a 3.62 ERA in seven career games against the Giants.