SAN DIEGO -- Eugenio Velez wanted to keep his pinch-hit at-bat against San Diego closer Trevor Hoffman simple. It worked.
Velez hit a 2-2 fastball from baseball's all-time saves leader off the wall in right field to drive in the go-ahead run in the 10th inning and give the San Francisco Giants a 3-2 victory over the Padres on Friday night.
The Giants then survived a bases-loaded scare in the bottom of the inning before closer Brian Wilson got Kevin Kouzmanoff to hit into a game-ending double play.
"I'm really not trying to do too much there," Velez said. "I'm looking for a fastball and I saw the fastball. You have to do something with it."
Velez's double scored Emmanuel Burriss, who had a bloop single with two outs. Burriss beat the high relay throw from second baseman Edgar Gonzalez.
Velez pinch hit after Giants manager Bruce Bochy initially sent up Omar Vizquel.
"Velez provides some pop, which he did there," Bochy said. "It's harder to get a bigger hit than that."
Hoffman, who has 546 saves, had converted 11 straight save chances since June 4, including all seven of his appearances in July. But Hoffman insisted he does not approach a non-save situation any differently than one with a save on the line.
"It's the same parameters," Hoffman said. "You have to hope to hold it, put up a goose egg and give it a chance."
But Velez's heroics were nearly undone when Wilson allowed San Diego to load the bases with one out.
After getting the first out, Wilson gave up consecutive singles to Edgar Gonzalez, Brian Giles and Adrian Gonzalez to load the bases.
Shortstop Ivan Ochoa fielded Kouzmanoff's grounder and looked to scoop the ball to Burriss to turn the double play. But after hesitating, Ochoa stepped on second and threw to first.
"If he feeds that ball there, (Kouzmanoff) might beat it out," Bochy said. "He had the instincts to take it himself and saved us there."
Sergio Romo (1-1) pitched the ninth for the win. Wilson picked up his NL-leading 29th save in 31 chances. It was his 20th straight save.
The Giants and Padres have played four extra-inning games in nine meetings this season.
Adrian Gonzalez hit a solo homer to left in the eighth on reliever Jack Taschner's first pitch to tie the game at 2. It was his 26th of the season and fourth in the last seven games.
San Francisco starter Tim Lincecum allowed one run and three hits in seven innings. He left with a 2-1 lead.
Lincecum struck out 11 to raise his total to 167, tops in the majors. Lincecum had 10 or more strikeouts for the fifth time this season and the seventh time in his career.
The right-hander escaped the only serious threat he faced by allowing one run in the second after San Diego had loaded the bases with one out.
"All in all, it was just about getting into a rhythm," Lincecum said. "I've been trying to get into a rhythm when I warm up between innings, not just throwing to get my arm loose. It seems to be working."
Lincecum, who lowered his ERA to 2.71, was coming off a career-high 13 strikeouts in his last start, a no-decision in a 5-3 loss against Arizona. He left that game with a 3-2 lead after seven innings.
Fred Lewis gave the Giants a 1-0 lead in the first on a sacrifice fly after consecutive singles by Randy Winn and Ochoa to open the game.
That broke a string of 23 scoreless innings for the Giants, who were shut out in their last two games at Los Angeles.
San Diego loaded the bases in the second on walks to Kouzmanoff and Nick Hundley sandwiched around Chase Headley's single. Lincecum got Luis Rodriguez to hit a grounder to first baseman John Bowker.
Bowker hesitated as he looked to throw home for the force. He never made the throw and held the ball too long as Rodriguez beat him to first with a headfirst slide, allowing Kouzmanoff to score.
Lincecum struck out rookie pitcher Josh Banks and Jody Gerut to end the inning.
San Francisco got consecutive singles by Lewis and Bengie Molina to start the fourth. After a double play advanced Molina to third, he scored on Hundley's passed ball for a 2-1 lead.
Banks started in place of San Diego ace Jake Peavy, whose start was pushed back one day to give him more rest. Banks allowed two runs -- one earned -- and eight hits over six innings.
Lincecum is 1-0 with a 0.68 ERA (two earned runs in 26 1/3 innings) in four starts against San Diego this season. ... Hundley threw out two runners attempting to steal. Padres catchers had combined to throw out just 14.2 percent (20-of-141) of potential base stealers coming into the game. ... The Padres played their first game without SS Khalil Greene, who was placed on the 15-day DL before the game with a broken left hand. Greene was injured when he punched a wall in the tunnel between the dugout and clubhouse after striking out during Wednesday's game against Arizona.