The Giants got the offensive fireworks going against Doug Davis as they grabbed a 3-0 lead through 1 1/2 innings.

The D-backs, though, responded with three runs in the second inning, which included an RBI double by Reynolds, his 100th run driven in of the year.

After the Giants added a run in the top half of the third, the D-backs sent 12 men to the plate as they scored six times and collected seven hits, chasing San Francisco starter Matt Cain.

"We had some great swings, came out banging early," Reynolds said.

The inning included a drive to right-center by Gerardo Parra that the umpires initially ruled a homer but wound up changing to a double after using video replay to determine the ball struck the green padding halfway up the wall.

In three previous starts against the Snakes this year, Cain (13-7) had compiled a 2.66 ERA, but Tuesday, they battered him for seven runs on eight hits in 2 1/3 innings to take a 9-4 lead.

"He just left a lot of balls over the plate," Reynolds said. "If you go look at all of our hits, they're catching a lot of white and normally he's on the corners with his fastball and sliders, but tonight he left a lot of balls over the plate and we put a good swing on them."

For the next three innings, the offenses went dormant as Davis found his rhythm.

The Giants were not ready to go quietly, though.

Trailing 10-4 heading into the eighth, they loaded the bases with one out against Davis, which prompted Hinch to summon closer Juan Gutierrez.

While it may not technically have been a save situation, it certainly seemed like it was to Hinch.

"This game felt like odd things, quirky things could come," Hinch said. "A [six]-run lead at that point felt like a one- or a two-run lead. When it got to the most important outs of the game, I wanted to go right to Guti. There was no way I was going to try and bridge the gap with anybody else."

Gutierrez got out of the inning with only one run scoring, but before the D-backs could take a breath, the Giants got the first two runners of the ninth on.

Both scored on Pablo Sandoval's triple to right, and Sandoval came home one batter later on Randy Winn's sacrifice fly to close the gap to 10-8.

The Giants, though, would get no closer as Gutierrez retired Juan Uribe and Ryan Garko to end the game.

"We had just enough to hold on," Hinch said.

Davis (8-13) picked up the win for the D-backs, the left-hander's first victory since Aug. 10, a span of seven starts.

The numbers -- five runs on 10 hits in 7 1/3 innings -- may not have been pretty, but the victory was still sweet for him.

"It feels good," Davis said. "I have to hand it to our offense tonight. They battled back after I had a rough first three innings and kept on going. As for me, I just went out and battled and had great defense behind me. I ran out of a little steam there at the end."

Steve Gilbert is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.