DENVER -- Journeyman Yusmeiro Petit gave the Giants a much-needed, and perhaps unexpected, lift Tuesday night. Starting in place of injured Matt Cain, Petit worked six solid innings as the Giants beat the Rockies, 5-3.
Petit held the Rockies to two runs and won for the first time since Aug. 27, 2009, while pitching for the D-backs against the Giants.
"I feel happy because I came back to this level again to win at this level," Petit said with teammate Pablo Sandoval translating.
Sandoval homered following a mammoth two-run shot in the first by Hunter Pence, the first time the Giants have hit back-to-back homers since Sept. 20, 2012, at AT&T Park against the Rockies.
Pence's homer cleared the left-field concourse. ESPN Stats and Information estimated the ball traveled 476 feet and was the longest homer in the Majors this season. It came after a two-out single by Brandon Belt, who went 4-for-5 with four singles.
"All my hits combined probably weren't hit as hard as his," Belt said. "I heard it hit the bat and saw the trajectory, and I knew it was going to be out a long, long ways."
Pence, who prefers not to talk about himself, gave credit to Petit for setting the tone of the game and had little to say about his home run. He said he didn't watch the flight of the ball or see it on replay.
"It was in the first inning and feels good to get some runs on the board," Pence said.
Petit threw first-pitch strikes to 20 of the 26 batters he faced and threw 67 of his 96 pitches for strikes. This was Petit's 38th Major League start but just his second in the past four seasons. His lifetime record in those 38 starts is 10-17 with a 5.15 ERA. In four previous starts against the Rockies, Petit hadn't pitched more than five innings.
"He pounded the strike zone with all of his pitches and threw quality strikes," Giants manager Bruce Bochy said. "He's been around, knows what he's doing out there. He showed it tonight."
This was just the second Major League start for Petit in the past four seasons. This year, Petit went 5-6 with a 4.52 ERA in 15 starts at Triple-A Fresno but had allowed three or fewer runs in each of his final seven starts with a 2.30 ERA in those games.
On Tuesday, Petit gave up single runs in the third and fourth. With a runner at third and one out in the third, he struck out Corey Dickerson and got DJ LeMahieu to fly out. Pitching carefully in the fourth to No. 8 hitter Charlie Blackmon, who doubled home a run in the third, Petit walked him to load the bases for pitcher Chad Bettis and struck him out.
The Giants made it 4-2 in the sixth when Hector Sanchez singled home a run with one out after singles by Belt and Sandoval. That was the last inning for Bettis, who has allowed five homers in 30 innings in his six career starts and is 0-3 with a 4.80 ERA. Bettis settled down and didn't allow a run until Sanchez's single in the sixth, Bettis' final inning. But the first inning doomed him and the Rockies.
"I think he missed a couple pitches in the zone," Rockies catcher Wilin Rosario said, "and we can't execute the last pitch. Every hitter we got two strikes, and we couldn't execute the one pitch to make an out. I think that's why he got a little bit out of control, and we gave up three runs."
Actually, Pence hit his 16th homer on a 1-1 pitch, and Sandoval hit his 10th homer with the count 1-1.
The Giants added a run in the seventh against Adam Ottavino when Marco Scutaro hit a sacrifice fly after Gregor Blanco opened the inning with a double and took third on center fielder Blackmon's error.
The Rockies got that run back in the bottom of the inning against Sandy Rosario. He walked pinch-hitter Jordan Pacheco and gave up a double to Dickerson to start the inning. Pacheco scored on a groundout, but Rosario stranded a runner at third when Troy Tulowitzki flied out to short center and Michael Cuddyer grounded to second.
After Javier Lopez struck out Todd Helton to open the eighth, Santiago Casilla gave up a double to Wilin Rosario, who took third on a groundout. Blackmon fouled out to end the inning.
Sergio Romo retired the side in order in the ninth to earn his 32nd save in 36 chances and preserve the long-awaited win for Petit.
"He's a guy that commands the fastball well," Bochy said. "He's got four pitches he can throw at any time. He's not going to overpower you, but he's got the savvy you like from a pitcher. And he comes at you. This is not any easy park to pitch in against a great lineup."
Jack Etkin is a contributor to MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.