SAN FRANCISCO (AP) Justin Morneau, in what could have been his final at-bat with Colorado, delivered a pinch-hit, game-winning hit. He's happy to think about the win rather than his future with the club.

Corey Dickerson hit a three-run homer ahead of Morneau and the Rockies rallied for seven runs in the ninth inning Sunday to beat the San Francisco Giants 7-3.

''It's a good way to end a rough season,'' Morneau said. ''I'm happy for today and to finish the season healthy. What happens coming up down the road, we'll see.''

More from FoxSports

Morneau didn't expect to get into the game, though Rockies manager Walt Weiss warned him of the possibility.

''I did tell him if the game was on the line, I'd pinch hit him,'' Weiss said. ''Sure enough, we got in that position and it happened so quickly he didn't have a lot of time to get ready. Being the pro that he is, he took about 10-15 swings off a tee and walked up there on deck and got a game winning hit. Very apropos.''

Carlos Gonzalez and third baseman Nolan Arenado combined to hit 82 home runs and drive in 227 runs, the most productive duo in Rockies history since Todd Helton and Larry Walker combined for 87 homers and 269 RBIs in 2001.

''It's unfortunate our record wasn't better and him not being considered of being one of the favorites for that MVP award,'' Morneau said of Arenado. ''I still think he should be. What he meant to this team both offensively and defensively, I don't think there's anybody who does what he does on both sides of the baseball. He's the best defensive third baseman I've ever seen.''

The Giants finished 84-78, a year after winning 88 games in the regular season and going on to take their third World Series title in five seasons.

Colorado's comeback spoiled Matt Cain's outing. He started for the first time in six weeks and pitched two-hit ball for five scoreless innings.

''He should take away that he's back,'' Giants manager Bruce Bochy said. ''What a great job he did against that lineup. He should be really encouraged. An outing like that should do so much for him.''

The Giants wound up using 11 pitchers. They took a two-hit shutout into the final inning before the Rockies rallied. Charlie Blackmon also drove in a pair of runs for the Rockies.

Rex Brothers (1-0) pitched a scoreless eighth for the win. George Kontos (4-4) took the loss.

Buster Posey drove in his 95th run for the Giants, who won the NL wild-card game last season.

Rockies closer John Axford walked two, sandwiched around a double, to load the bases in the ninth. He struck out Matt Duffy and got Posey to ground out to end the game.

The Rockies finished the year with 68 victories, two more than last year. It was their fifth straight losing mark.

Giants reliever Jeremy Affeldt, who announced his retirement last week, recorded the first two outs of the sixth before leaving to a standing ovation.

Affeldt hugged manager Bruce Bochy and the gathered infielders before heading off the mound for the final time and acknowledging the fans.

The Giants recorded their 408th consecutive sellout, the longest active streak in the majors. They drew 3,375,882 this year, 7,285 more than in 2014.

San Francisco, which clinched the NL team batting crown, started six rookies.

TRAINER'S ROOM

Rockies: C Tom Murphy underwent an MRI on his left shoulder. It showed no structural damage, but confirmed a mild strain and also revealed a contusion.

UP NEXT

Rockies: Opens the 2016 regular season on April 4 at the Arizona Diamondbacks.

Giants: Cactus League opener on Wednesday, March 2 vs. Los Angeles Angels at Scottsdale Stadium.