SAN FRANCISCO -- Hunter Pence followed his first long-term contract with his first game-ending hit with San Francisco.
Pence singled in the winning run with no outs in the ninth inning to give the Giants a 7-6 victory over the San Diego Padres on Sunday.
"Honestly, they showed faith in me by giving me the contract and that lifted my spirits," said Pence, who formally signed a five-year with the club earlier in the day. "I wanted to show them why they should believe in me."
Pence's last walk-off hit came with the Philadelphia Phillies on May 15, 2012.
"This game was a great way to go into the offseason," Pence said. "We have a team that battles and is scrappy. The last three weeks we've been playing that way and that gives us momentum heading into offseason."
"That's a tough one, whether it's April, May, June or . . . September," Padres' manager Bud Black said. "Huston has been so reliable for us the past couple of years and it just goes to show that players are not invincible."
After Buster Posey was intentionally walked, Pence, who had three RBIs, singled to center to end the game.
"You couldn't ask for a better story today with everything that happened," Giants manager Bruce Bochy said. "It felt like a playoff game. I guess the guys really wanted a piece of third place."
Jedd Gyorko hit a grand slam and Nick Hundley homered for the Padres. Gyorko's slam put an exclamation point on a sensational rookie season. He became the first rookie second baseman to lead his team in RBIs. His 23 homers are the third most by a rookie second baseman ever.
"He's had a fabulous year, no doubt about it," Black said. "The power numbers, the defense and you add the time he missed where he could have added to those numbers. He had a good rookie season, there's no doubt about that."
Tyson Ross pitched six innings, allowing three runs on seven hits. He walked one and struck out seven. He was 0-4 in his previous eight starts.
Belt drove in two runs for the Giants, who lost their second straight. Pablo Sandoval also drove in a run.
It also broke a 2-2 tie in the fifth. Walks to Alexi Amarista and Jesus Guzman sandwiched around Chris Denorfia's single loaded the bases ahead of Gyorko, who was the first hitter faced by Giants reliever Kyle Dunning.
Hundley led off the third with his 13th home run, a career high. Tommy Medica doubled home a run in the fourth.
Barry Zito entered the game for one batter in the eighth, striking out Mark Kotsay in what was likely his last appearance in a Giants uniform. He received a standing ovation and acknowledged it with a wave of his cap to the entire stadium.
"That was a special moment," Pence said. "He was in a zone and went to get the one out. It was powerful."
The Giants end the season with a streak of 246 regular-season sellouts. ... The Giants had the best record within the NL West Division and won the season series against each of the other four teams. ... Sunday was the 59th anniversary of Willie Mays' catch in game one of the 1954 World Series. ... Denorfia, who had three hits, ended the season with a seven-game hitting streak. ... Padres OF Mark Kotsay played in his 1,914th and final game. ... Gyorko hit the Padres second grand slam of the season and No. 135 in franchise history.
Can cash-strapped Cubs solve need for late-game relief?
Working around a bloated budget, the Cubs might only target bullpen help with closer Brandon Morrow likely to miss the first month of 2019.
The Dominant 20: The best of the best
Comebacks? Records? Those are nice. But ESPN's Peter Keating says the 20 most dominant athletes of 2018 made our list by redefining the impossible.
Adam Ottavino says game is different now and Babe would struggle
Reliever Adam Ottavino says that baseball is different from when Babe Ruth played and that he'd strike out the legend "every time."
The Dominant 20
Comebacks? Records? Those are nice. But Peter Keating says the 20 most dominant athletes of 2018 made our list by redefining the impossible.
Harper's inconsistencies don't make him a team's total answer
The Baseball Tonight crew discusses Bryce Harper's inconsistencies and how teams perceive them during free agency.
Coming off hip surgery, Giants' Buster Posey could be limited early in season
Offseason surgery on his right hip could limit Giants catcher Buster Posey early in the season, but Giants president of baseball operations Farhan Zaidi said Monday that Posey will return to 100 percent with time.