Angel Pagan smacked a solo home run in the eighth inning to lift the San Francisco Giants to a 3-2 win over the Los Angeles Dodgers in the rubber match of a three-game set from AT&T Park.
Pagan broke a 2-2 tie when he led off the bottom of the eighth with his fifth homer of the season, which narrowly cleared the wall in left, off Paco Rodriguez (3-4).
Tim Lincecum started for the Giants and went seven innings, yielding both runs on eight hits while striking out six in his final start of 2013. Santiago Casilla (7-2) needed just six pitches to get through the eighth and Sergio Romo set the Dodgers down in order for his 38th save of the year.
"It's kind of hard not to get up when you're playing that team," said Lincecum, a pending free agent who might have pitched his final Giants game. "The fans want it as bad as we do."
Brandon Belt doubled twice and drove in a run for the Giants, who went 11-8 against the Dodgers this season.
Edinson Volquez tossed five innings for LA, which fell three games behind the Braves and Cardinals for best record in the National League. The veteran right-hander surrendered two runs on four hits and three walks.
"I'd love to see us score 10 runs a night and throw a shutout and have every [reliever] get their outs, but to be honest with you, I don't think it matters one bit, not until next Thursday," Dodgers manager Don Mattingly said.
The Dodgers scored a run in the top of the first when Adrian Gonzalez plated Carl Crawford, who tripled with one out, with a sacrifice fly to center.
Juan Uribe and Mark Ellis belted consecutive doubles to start the away fourth, spotting LA a 2-0 advantage. Lincecum went on to strike out the next three batters he faced.
The lead vanished when the Giants put two across in the bottom of the fifth. Nick Noonan singled, moved to second on a wild pitch and took third on Lincecum's sac bunt. Pagan then grounded out, allowing Noonan to score the first San Fran run. Gregor Blanco followed with a walk and Belt plated him with a double to right.
The Dodgers fell to 63-63 all-time at AT&T Park. They had been the lone team in the National League with a winning record in the San Francisco ballpark ... LA finished its final road trip of the season with a 5-5 record. The NL west champs return home to face Colorado to finish the regular season ... The Giants are 5-1 in their last six games with the Dodgers.