SAN FRANCISCO -- One dramatic hit will not make up for Ray Durham's down season -- yet it sure brightened the Giants' mood for a day against their archrivals.
Durham stepped in as a pinch hitter and had a go-ahead, three-run homer in the eighth inning, and the Los Angeles Dodgers missed another chance to gain ground in the playoff race with a 4-2 loss to San Francisco on Sunday.
"That might be the best thing that's happened to him all year," starting pitcher Matt Cain said. "So deserving, too. He's working his tail off."
Jeff Kent homered twice against his former club but the Dodgers couldn't hold a late lead and failed to move closer to the Padres, who lost at Colorado. San Diego remained 2½ games up on Los Angeles in the NL wild-card chase.
Durham was behind 0-2 when he connected for his 11th homer of the year with a shot to the right-field arcade. It was his third career pinch-hit homer and second this season.
Dodgers manager Grady Little made three pitching changes in the eighth to try to escape trouble.
All-Star Brad Penny was done after allowing Kevin Frandsen's leadoff double. Scott Proctor's wild pitch sent Frandsen to third, then Randy Winn struck out before Joe Beimel (4-2) relieved to face Barry Bonds.
Bonds was intentionally walked and replaced by pinch-runner Rajai Davis. Little then went to Jonathan Broxton to face Durham.
Davis stayed in the game to play center field in the ninth and made a running, leaping catch to rob James Loney of an extra-base hit to start the inning. Tyler Walker (1-0), back after reconstructive elbow surgery, pitched the eighth for his first win since May 19, 2006, with Tampa Bay. Brad Hennessey recorded three outs for his 19th save in 23 chances.
Manager Bruce Bochy wasn't sure the speedy Davis would make the play.
"I expected that everybody was expecting me to catch it, and if I didn't catch it I was letting everybody down," said Davis, a rookie acquired at the trading deadline from the Pirates. "I had to make a little push, find the spot, look up, and there it was."
Kent connected off Cain leading off the second and again to start the seventh. It was his 19th multihomer game and first since Oct. 2, 2004, against Colorado with Houston.
Kent also hit his 59th and 60th homers as a Dodgers second baseman, passing Charlie Neal for third in franchise history at the position. Davey Lopes (98) and Jackie Robinson (80) are the two ahead of him.
Los Angeles went 7-2 in San Francisco this season, losing Friday night to end an 11-game winning streak in the Giants' waterfront ballpark. Los Angeles has won 12 of its last 14 road games in the series. The teams play three more times to end the season at Dodger Stadium.
The Dodgers begin a key six-game homestand against San Diego and Arizona starting Tuesday night.
"We're in a position where we can't give games away," center fielder Juan Pierre said. "We shot ourselves in the foot this series. That makes next week even more important. Now, it's a sub-par road trip and there's more pressure going home. We can only blame ourselves."
Cain has never beaten the Dodgers, going 0-3 in his first five starts. Cain, who had won three of his last four starts during a rough season, allowed two runs and six hits in seven innings.
"When these guys come in, we have to play better and make this rivalry as big a deal as it is," Cain said. "I think we did this series."
Penny was trying to match his career-best victory total of 16 accomplished last season.
Cain plunked Penny to load the bases in the seventh. Russell Martin tripled one out after Kent's 19th homer of the year and Nomar Garciaparra was intentionally walked two batters later, but Tony Abreu grounded out to end the threat.
Bonds went 1-for-2 with two walks and a single and Bengie Molina doubled and had three hits for the Giants. But Durham's hit had everybody thrilled, and he pointed to his brother, Ronald, in the stands after crossing home plate.
"I'm sure that was a load off him," Bochy said.
Durham had been mired in a 1-for-19 stretch over his previous six games and is batting just .218 on the year.
"I've still got my head up," he said. "I'm looking at film and doing the things I've been doing all year."
San Francisco took a 1-0 lead in the first on Winn's RBI groundout after Dave Roberts led off with a double and went to third on Frandsen's sacrifice.
Giants SS Omar Vizquel returned to the lineup after sitting out Saturday with food poisoning. ... Cain gave up two or more homers for the sixth time in his career and third this year. ... Andre Ethier's single in the second improved his average against Cain to .667 (6-for-9). ... Dodgers SS Rafael Furcal had the day off. ... Pierre went 0-for-4 for Los Angeles, ending his 10-game hitting streak. ... The Giants had their 33rd comeback win of 2007.