Buster Posey legged out a double after his slow bouncer caromed off second baseman Jerry Hairston Jr. and then scored the winning run on Juan Uribe's single in the 11th inning to give the Giants a 3-2 win over the Padres on Saturday.
"I don't look at it like I won the game," Uribe said. "Buster won the game. Getting the double leading off, this guy won the game for us today."
Posey's hustle, Uribe's clutch hit, and four tense-but-scoreless innings by the bullpen gave the Giants just their second win in 10 meetings this season with first-place San Diego.
San Francisco moved within 2 1/2 games of the Padres and have a chance to win the series when ace Tim Lincecum takes the mound in Sunday's series finale.
"They've owned us all year," Giants outfielder Aubrey Huff said. "It seems like we match up well. They just come out on the winning end most of the time. We finally caught some breaks."
Posey created the big break that won this game. He led off the 11th with a bouncer up the middle that just eluded Tim Stauffer (3-2). Hairston tried to get to the slow roller before it got to the outfield but deflected it into left-center and Posey hustled into second.
"I saw it kind of carom off to the left from my angle and figured it was worth taking the chance," Posey said. "I used what little I had left in the tank."
After Pablo Sandoval was intentionally walked, Uribe blooped a single to right and Posey easily scored setting off a celebration for the sellout crowd.
"It was one of those games going back and forth all the time," Stauffer said. "Both teams had chances to win it. And then their balls found their holes there in that last inning. That was pretty much it. Posey's hit just found it's way up the middle and took a tough bounce off the glove and was able to get on second. Then it's an uphill battle."
Santiago Casilla (4-2) escaped a first-and-third, one-out jam in the 11th by striking out Chase Headley and getting Tony Gwynn to line out to center to earn the win. Casilla extended his scoreless streak to 13 innings.
The Padres stranded 16 runners, including the bases loaded in the eighth and two runners each in the ninth, 10th and 11th innings. San Diego had won five straight.
"You can't overlook the job the bullpen did," Huff said. "They kept us in the game the whole time. A lot of scary situations that the bullpen got out of to keep us in the game."
The Giants fell behind 2-0 early to a sharp Mat Latos and looked poised to fall once again to the Padres. But Sandoval ended Latos' day with a leadoff homer in the seventh.
Gregerson had allowed four baserunners and no runs in 16 1/3 career innings against the Giants before Mike Fontenot started a rally with a groundball single to right field. He went to third on Huff's double and scored on Pat Burrell's RBI groundout. Gregerson escaped with the tie intact, but the Giants still got the win.
Latos pitched a one-hitter here in May and looked almost as dominant this start, matching his career high with nine strikeouts. He left after allowing Sandoval's eighth homer of the season, yielding five hits and no walks in six-plus innings.
He threw a career-high 108 pitches and set a franchise record by allowing two or fewer runs in 11 straight starts.
"I didn't want him to throw 125 pitches," manager Bud Black said. "It was just one of those decisions. Take him out and go to our pen. Our pen is best in the National League."
Jake Peavy had 10 straight starts with two or fewer runs in 2004 for the Padres. ... Newly acquired OF Jose Guillen grounded out as a pinch-hitter in the ninth inning in his debut for the Giants. ... Hall of Famers Tom Seaver and Dave Winfield were at the game. ... Bumgarner needed just three pitches to get out of the third inning despite allowing a leadoff double to Miguel Tejada. Ryan Ludwick lined into an inning-ending double play. ... Giants starters are winless in their last 11 games, recording six losses and five no-decisions.