SAN FRANCISCO -- The San Francisco Giants are on such a roll...even when their bid for a game-winning home run bounces off the fence, it winds up being good enough.
Brandon Crawford was credited with a 399-foot single Wednesday afternoon when his liner off the center field wall scored Matt Duffy from second base with two outs in the 10th inning, giving the Giants a 4-3 win over the San Diego Padres.
San Francisco's second-walk off victory in three days completed a three-game sweep and gave the Giants a fifth consecutive win.
"They're always fun. It's a fun celebration," Crawford said of walk-off hits, a category in which the Giants lead the major leagues with five this season. "But at the end of the day, a win is a win. You'll take it any way you can get it."
Right-hander George Kontos pitched out of a jam in the top of the 10th inning, setting up the game-winning uprising, as the Giants recorded a franchise-record ninth consecutive win over the Padres this season.
The Giants have outscored San Diego 42-21 over the nine-game run.
"We're playing good baseball. We've had really good pitching and defense," Crawford said of the club's stretch of 13 wins in 14 games. "And now we've found the bats a little bit."
After San Diego third baseman Yangervis Solarte's two-run homer in the eighth inning forged a 3-3 tie that eventually produced extra innings, Duffy singled off the fifth Padres pitcher, left-hander Brad Hand (1-2), with one out in the 10th.
After a second out, Duffy advanced to second on a wild pitch, then scored when Crawford lined a shot over the head of center fielder Jon Jay to end it.
"I was just hoping they wouldn't catch it," Crawford said of his fourth career walk-off hit. "It would have been nice to get a home run, but I'll take it."
Kontos (1-1) stranded Wil Myers on third base in the top of the 10th by striking out Solarte and getting Matt Kemp to ground out. He wound up credited with the win.
"When you're going well, these games tend to go in your favor," said Duffy, whose Giants won a pair of one-run games in the series. "At the same time, the reason things are going in our favor is we're playing good baseball. We're making the other teams beat themselves."
In losing a fourth straight game overall, the Padres rallied in the eighth on Solarte's shot off Giants left-handed reliever Josh Osich.
The homer, Solarte's first of the season, also scored Christian Bethancourt, who drew an inning-opening walk as a pinch hitter.
The Padres lost their 11th in a row at AT&T Park.
"It's momentum-based," Padres manager Andy Green said when asked about the difference between narrow wins and losses. "Once you start winning those games, you start expecting to win them. The Giants have done it against us. They take championship-caliber swings when they have the opportunity."
Crawford, Duffy, Gregor Blanco and Kelby Tomlinson had two hits apiece for the Giants, who went 5-1 on their just completed homestand.
Not all went well for the Giants. They lost Brandon Belt to a sprained left ankle in the eighth inning after he slid awkwardly into second base.
Belt, who had to leave the game, will be re-evaluated Thursday.
Both starting pitchers threw well enough to win, but neither got a decision.
In search of just his second win of the season, Giants right-hander Jake Peavy left with a 2-1 lead in the seventh inning, having allowed six hits. He struck out four and walked one.
Padres right-hander James Shields gave up two runs in six innings. He allowed five hits, walked one and struck out six.
The Giants staked Peavy to a 2-0 lead, scoring in the second on an RBI single by Tomlinson and in the sixth on a run-scoring single by Duffy.
The San Diego comeback began with Alexei Ramirez's two-out RBI single in the seventh off Peavy, ending the former Padre's day.
Osich got out of the inning without further damage, and the Giants added to their lead on a run-scoring double by Denard Span in the bottom of the seventh.
Solarte followed with his homer in the top of the eighth.
"It's really frustrating to lose games like that," Solarte said. "The only silver lining, if you call it that, is we're losing close games. But it's hard when you do that. There are small mistakes that lose the game in close ones."
NOTES: Giants starting pitchers combined to go 4-1 with a 1.91 ERA on their six-game homestand. ... Both managers wound up using players who hadn't started because of minor injuries. Padres 1B Wil Myers (left forearm tightness) walked as a pinch hitter in the top of the 10th. San Diego manager Andy Green said he hopes Myers can return to the starting lineup Friday in Arizona. Giants RF Hunter Pence (strained right hamstring), meanwhile, flied to left field as a pinch hitter in the bottom of the 10th, one batter before SS Brandon Crawford's game-winner. Pence didn't start for the fifth consecutive game. ... Padres LHP Matt Thornton (left Achilles tendinitis) was scheduled to make a second injury rehab appearance at Class A Lake Elsinore on Wednesday night after pitching a 1-2-3 inning Tuesday. Green indicated Thornton is a candidate to be reinstated from the disabled list as early as Friday.