SAN FRANCISCO — Travis Ishikawa hit a tiebreaking three-run homer in the eighth inning after scoring the tying run in the seventh on a wild pitch and the San Francisco Giants held off a rally to beat the Arizona Diamondbacks 5-4 on Tuesday night.
Juan Uribe hit a solo homer in the second for San Francisco, which bounced back from a heartbreaking 14-inning loss at Colorado on Monday night in which Ryan Spilborghs hit a game-ending grand slam.
The Giants snapped a three-game losing streak and remained four games behind Colorado in the NL wild card.
Ishikawa had one extra-base hit in his previous 70 at-bats — going a stretch of 31 games without one — before his double in the seventh. He connected off Jon Rauch (2-2) for his ninth homer.
Jeremy Affeldt (1-1) pitched the eighth for the win and Sergio Romo recorded the final out for his second save in as many chances.
Brian Wilson, on the mound one night after throwing 41 pitches, retired the first two batters in the ninth before allowing a single to Augie Ojeda then walking pinch-hitter Rusty Ryal and Stephen Drew to load the bases. Ryan Roberts followed with a two-run single and Romo relieved and got Chad Tracy to ground out.
San Francisco returned from a tough 5-6 trip in which the Giants led all four games at Coors Field but lost the final three. They lost 6-4 in 4 hours, 57 minutes Monday night after scoring three runs in the top of the 14th — and the team landed in San Francisco at 3 a.m.
Manager Bruce Bochy insisted his club could rebound.
"I hope it takes 72 hours," joked Diamondbacks manager A.J. Hinch.
Ishikawa scored the tying run in the seventh on Dan Haren's third wild pitch of the game.
Bob Howry walked Roberts on five pitches to start the eighth, and after starting 2-0 against Tracy, Bochy quickly to turned to Affeldt.
The Diamondbacks lost for the eighth time in nine games after snapping a season-long seven-game losing streak Sunday in a 7-5 win at Houston.
Arizona scored twice in the fifth to take the lead, including getting an unearned run after Ojeda reached on Eli Whiteside's catcher's interference. Ojeda still made contact and hit a fly ball to right field, but got to take first.
Whiteside helped save a run in the sixth. Gerardo Parra drew a two-out walk, then was thrown out at home on Alex Romero's double. Whiteside blocked the collision and Parra didn't attempt to slide.
Slugger Pablo Sandoval didn't start for the Giants because of a bruised right calf but pinch-hit in the seventh. He drew an intentional walk after the wild pitch that allowed Ishikawa to score. Pitcher Barry Zito entered as a pinch-runner, the third time in two games the Giants have inserted a pitcher to run.
The night began as a pitcher's duel featuring 12-game winners Matt Cain and Haren.
Haren struck out six and walked one in seven innings. Cain, the All-Star right-hander, received his third straight no-decision and is winless in six starts since a victory at Coors Field on July 24.
NOTES: The Giants sported their "GIGANTES" jerseys for Latino Heritage Night. ... San Francisco C Bengie Molina had the night off. ... All six of Uribe's hits against Arizona this year have been for extra bases — four doubles and two homers. ... Diamondbacks OF Justin Upton, on the DL since Aug. 6 with a right oblique strain, hit a grand slam for Class-A Visalia in second rehab game. ... Drew rejoined the D-backs after missing the last two at Houston over the weekend to be with his pregnant wife in Arizona.