SAN FRANCISCO -- An odd year had an odd ending for the San Francisco Giants.
In the end, it was a loss, and somehow that was fitting.
Left fielder Corey Dickerson tied the game with a three-run home run, pinch-hitter Justin Morneau and center fielder Charlie Blackmon added subsequent two-run singles, and the Colorado Rockies exploded for seven runs in the ninth inning Sunday to stun the Giants 7-3 in the season-ender for both National League West teams.
Third baseman Nolan Arenado did not add to his home run total for the Rockies, but he did contribute a single to the ninth-inning rally that began with the Giants holding a 3-0 lead.
Arenado went 1-for-3 with a walk and a single and finished the season with 42 home runs, tied with Washington Nationals outfielder Bryce Harper for the league lead.
Meanwhile, for the third time in five years, the Giants' season-ender came in the regular season following a year that that culminated in a World Series championship.
"Just shows you how hard it is," Giants manager Bruce Bochy said. "We battled, and I'm proud of that."
The Giants finished 84-78 one season after their 88-74 record got them into the playoffs as the second wild card.
The four-game dropoff was less than they'd endured following their previous championships in 2010 (92 wins to 86) and 2012 (94 to 76).
The Giants did earn a consolation prize in defeat. With 12 hits, they wrapped up their first NL team batting title in 22 years with a .267 average.
The Rockies, whose 68-94 final record tied for the fourth-worst in baseball, finished second to the Giants in hitting with a cumulative .265 average despite being out-hit 12-9 in the finale.
"It's a snapshot of our season when you look at it," Rockies manager Walt Weiss said of the win. "We dug ourselves a hole quite a bit like we did today. We try to fight our way back. Sometimes we did and sometimes we didn't. They know how proud I am of them, the way we kept fighting."
Giants right-hander Matt Cain, attempting to end a miserable year on a positive note, pitching five innings of shutout ball and combined with six relievers on a two-hitter entering the top of the ninth.
But that's when pinch-hitter Rafael Ynoa got the Rockies' winning rally rolling with a one-out single off the eighth Giants pitcher, left-hander Javier Lopez.
Arenado greeted right-hander George Kontos with a single, setting the stage for Dickerson, who belted his 10th homer of the season over the right-field wall to forge a 3-3 tie.
The Rockies weren't done.
Pinch-hitter Ben Paulsen singled, ending Kontos' day. Right-hander Cody Hall then walked second baseman Daniel Descalso, and catcher Dustin Garneau's single loaded the bases.
Morneau and Blackmon followed with their two-run hits, propelling the Rockies into a 7-3 lead.
"I wasn't planning on using Mornie today, but I did tell him if the game was on the line, I'd pinch-hit him," Weiss reported. "Sure enough, we got in that position and it happened so quickly he didn't have a lot of time to get ready. But being the pro that he is, he went down, took about 10-15 swings off a tee and walked up there on deck and got a game-winning hit. Very apropos."
Left-hander Rex Brothers (1-0), who worked a scoreless eighth inning, got the win. Right-hander John Axford wrapped up the win with a shaky ninth inning during which the Giants brought the potential game-tying run to the plate.
"You hate losing," Bochy assured. "It could be spring training ... That's tough. It was a Debbie Downer, the last inning. No doubt about it."
Kontos (4-4) took the loss.
Right fielder Carlos Gonzalez, who left the game for a pinch-hitter in the ninth, had two of the Rockies' nine hits, including a first-inning triple.
First baseman Buster Posey had two hits and drove in his team-leading 95th run of the season for the Giants, who lost the season series 11-8 to the last-place Rockies.
Cain was seeking his first win since July 22. The former three-time All-Star had been roughed up for at least four runs in five of his last six starts before Sunday's effort.
Cain allowed two hits and one walk in his five shutout innings. He struck out one.
"Wow. He should take away that he's back," Bochy said of Cain, against whom opponents had hitting .308 in his previous 11 starts after he had begun the season on the disabled list with a flexor tendon strain in his right arm. "What a great job he did. He should be really encouraged."
The Giants grabbed their early lead with a two-run first inning, opening the game with four straight hits, including RBI singles by third baseman Matt Duffy and Posey. Center fielder Angel Pagan and second baseman Kelby Tomlinson scored the runs.
Both runs came against Rockies starter Christian Bergman, who pitched three innings. He allowed just the two runs on six hits, walked one and did not strike out a batter.
The Giants tacked on a third run in the sixth inning on an RBI single by catcher Jackson Williams against the third Rockies pitcher, right-hander Gonzalez Germen.
NOTES: The Giants honored the career of LHP Jeremy Affeldt in a pregame ceremony. The 14-year veteran reliever retired Sunday after facing two batters and getting two outs. He was the winning pitcher for the Giants in Game 7 of the 2014 World Series, and also helped pitch the Rockies into their only World Series appearance in 2007. ... The Giants set a franchise record by using 11 pitchers in a nine-inning game. ... MLB.com reported Sunday that the Giants have signed Cuban-born OF Eddy Julio Martinez, considered to be the top international prospect available to major league teams, to a $2.5 million deal. ... Rockies 2B D.J. LeMahieu, who did not play in the game, finished the season hitting .301. ... X-rays on the left shoulder of Rockies C Tom Murphy were negative. He suffered a contusion and strain while diving back into second base in Saturday's game.