PHOENIX (AP) -- Ryan Vogelsong was sent to the bullpen during the All-Star break. The San Francisco Giants sure needed him in their first game back.
Vogelsong pitched two scoreless innings for his first victory in relief in almost 10 years and the Giants used a throwing error by Arizona shortstop Cliff Pennington in the 12th inning to beat the Diamondbacks 6-5 on Friday night.
With the bases loaded and one out, Pennington - who entered in the 11th inning - fielded Angel Pagan's bouncer and threw home to try and get the forceout. But the throw bounced in front of the plate and got past catcher Welington Castillo.
The Giants' Hunter Pence had tied the game with a two-run homer in the three-run seventh and added a double and single. Joe Panik, Brandon Crawford and Matt Duffy also had three hits apiece for the Giants.
Crawford also made two outstanding defensive plays to get outs at third base.
''He put on a show,'' manager Bruce Bochy said.
Vogelsong (7-6), the last of 10 pitchers used by the Giants, went to the pen to make room in the rotation for Monday's anticipated return of Tim Hudson. It was Vogelsong's third career win in relief, first since Sept. 14, 2005.
''It was pretty impressive,'' Pence said. ''We needed it and he came through clutch for us today and tried a way to battle through a tough game.''
Randall Delgado (4-3) gave up the unearned run in two innings for the loss.
''We just didn't do a good job tonight,'' Arizona manager Chip Hale said. ''We've got to figure it out. It is four (losses) in a row now. We are a better team than that. We had a three-run lead and we couldn't hold that. It is not good. It is not a good result. You make mistakes against a team like that they are very veteran-laden and they took it to us.''
The game lasted 5 hours, 11 minutes - third-longest in Chase Field history, an exhausting re-start to the season after the All-Star break rest.
''It felt like the first of the year when the game started,'' Crawford said. ''Now it feels like July again.''
Chris Owings homered and David Peralta had three hits, two of them triples, for Arizona, which lost its fourth straight. The Diamondbacks' A.J. Pollock doubled twice and scored both times and Paul Goldschmidt had two sacrifice flies.
Crawford singled to start the 12th and, with one out, Gregor Blanco walked. Vogelsong put down a bunt that got past Delgado for a single to load the bases and bring up Pagan.
Arizona took a 5-2 lead into the seventh, when the Giants rallied against reliever Enrique Burgos. One-out singles by Panik and Duffy put runners at first and third and Buster Posey brought a run home with a sacrifice fly. That brought up Pence, who sent an 0-1 pitch into the seats in right field and it was 5-5.
For the second time this season, a downpour led to a couple of leaks in the Chase Field roof, one onto the pitcher's mound near the rubber. This time, the grounds crew seemed ready, taking a shovel and rake to work on the mound between the seventh and eighth innings.
The roof leaked in a 7-2 win over the New York Mets on June 5. As it did the first time, it leaked much harder just in front of the screen behind home plate.
Giants: LHP Jeremy Affeldt (left shoulder strain) pitched one scoreless inning in a rehab assignment with Triple-A Sacramento on Thursday night. Bochy says he expects Affeldt to join the big league club in the latter part of the three-game series in San Diego that begins Monday.
Diamondbacks: OF Ender Inciarte (strained right hamstring) was reinstated from the 15-day DL. Inciarte grounded out as a pinch-hitter in the eighth. ... C Jarrod Saltalamacchia was placed on the 15-DL with a neck strain. Saltalamacchia said he tweaked his neck last week swinging a bat in Texas.
Giants: RHP Jake Peavy (0-4, 4.71 ERA), still looking for his first victory of the season, makes his third start since returning from the DL. He is 0-2 in those starts, but with a 2.03 ERA. Peavy is 5-1 with a 3.38 ERA in his last six starts against Arizona.
Diamondbacks: RHP Chase Anderson (4-3, 3.91), 1-1 with a 5.71 in his last three starts, takes the mound in the second game of a 10-game homestand.