SAN FRANCISCO — Hunter Pence hit his career-best 26th home run to back a shaky outing by Ryan Vogelsong and the San Francisco Giants beat the San Diego Padres 7-3 Friday night.
Brandon Belt and Juan Perez also homered for San Francisco in the first game of the season-ending series between two teams battling to stay out of the cellar in the NL West.
Vogelsong (4-6) gave up a pair of runs in the first three innings and had to pitch out of a two-on, two-out jam in the sixth to win for the first time since Aug. 25.
Chris Denorfia singled and scored twice for the Padres, who lost for the sixth time in seven games at San Francisco's waterfront ballpark.
An hour after receiving San Francisco's 2013 "Willie Mac Award," given out annually to the most inspirational Giants player, Pence homered off San Diego starter Burch Smith to cap a three-run third inning.
The 30-year-old outfielder is set to become a free agent this offseason and has already stated his desire to return to San Francisco.
Belt also homered in the third while Perez hit his first career home run in the second.
Vogelsong did just enough to make it hold up.
The Giants' right-hander, who missed more than 2 1/2 months after breaking bones near the pinkie of his pitching hand on a swing in May, allowed five hits over six innings. He walked four and struck out three.
San Francisco is trying to close out its season on a strong note after struggling nearly all season. The defending World Series champs (75-85) are guaranteed of their worst finish since going 72-90 in 2008.
The Padres had won two straight before falling into a tie with the Giants with two games left. Both teams are 17 games out of first place in the NL West.
Smith (1-3) allowed six runs and eight hits over 5 2-3 innings. The San Diego rookie walked three and struck out eight, giving him 42 in 31 innings.
Tommy Medica's RBI single in the first inning gave the Padres an early lead.
San Francisco answered with three home runs to go in front for good.
Perez's home run, a two-out line drive to left after Pablo Sandoval walked earlier in the inning, made it 2-1.
After Denorfia walked and scored in the third to tie it, Belt hit a two-run shot in the bottom of the inning. Two batters later, Pence snapped an 0-for-27 skid with his two-run blast to give the Giants a 5-2 lead.
Gregor Blanco's bases-loaded walk in the sixth forced in Brandon Crawford to make it 6-2.
San Diego loaded the bases in the eighth but reliever Santiago Casilla struck out Jesus Guzman then got Nick Hundley to ground into a 1-2-3 double play.
Pinch-hitter Logan Forsythe homered in the ninth off Javier Lopez for San Diego.
NOTES: Blanco was thrown out twice trying to extend hits in the first and eighth, and was picked off base in the fourth. ... The Giants have 105 home runs this season. They had 103 for all of 2012. ... San Francisco trainer Dave Groeschner said 2B Marco Scutaro had successful surgery to put a pin in his left pinkie. ... Padres closer Huston Street was given the night off. ... San Diego backup catcher Rene Rivera has left the team to join his wife in Puerto Rico for the birth of twins. ... Because of a day game after a night game, Chris Robinson will start at catcher for the Padres on Saturday. ... Members of the America's Cup winning Oracle Team USA attended the game.