SAN JOSE, Calif. -- The San Jose Sharks and Colorado Avalanche swapped goals in the final two minutes of regulation as if exchanging holiday gifts.
Sharks left winger Patrick Marleau and center Logan Couture ultimately slipped coal in the Avalanche's stocking during a shootout as the hosts escaped with a 5-4 win after letting a late one-goal lead slip away.
"It definitely wasn't ideal," Sharks captain Joe Thornton said. "With seconds left, it was disappointing we let them back in the game. ... It would have been nice to grab two (points) without giving them any, but that's the way it goes sometimes."
A wild end featured the two teams combining for three goals in 91 seconds during the final two minutes of regulation. The young and aggressive Avalanche, having lost their last 10 games at San Jose, almost pulled off a late stunner.
"It's too bad, but at the same time, we showed a lot of character," Colorado rookie coach Patrick Roy said.
San Jose center Joe Pavelski scored his 15th goal of the season with 19.6 seconds left to tie it 4-4. Thornton picked up his third assist of the game with a pass from behind the Colorado goal as San Jose had its goalie pulled for an extra attacker.
"It's frustrating because we tied it late and then took the lead late," Colorado defenseman Erik Johnson said. "Then they tied the game, and somebody had to win the skills competition at the end."
Just a minute before Pavelski's goal, Colorado scored twice in a 12-second span to grab a 4-3 lead.
Johnson scored from the left point with an extra attacker at 18:09, and Dallas left winger Jamie McGinn redirected a shot from center John Mitchell past San Jose goalie Antti Niemi at 18:21.
The Sharks just killed a Marleau penalty just before Johnson struck with a goal that slipped between the pads of Niemi.
"There wasn't much talk," Sharks defenseman Matt Irwin said of letting the lead slip away. "The leadership group did a great job, they got out there, and Joe made a great play. ... That's what those guys do."
The Sharks tilted the ice in the second period to turn a one-goal deficit after one into a 3-2 lead after two. San Jose outshot Colorado 21-5 while enjoying several extended shifts in the visitors' end.
"Our defense was pinching and our forwards were covering for them," Thornton said. "We were shooting, getting pucks back and looked dangerous. It's probably our best period all year."
The hosts tied the game 2-2 when right winger Brent Burns scored for just the second time in 12 games. His blast from the top of the right circle off a feed from Thornton beat Colorado goalie Semyon Varlamov at 5:53.
With Colorado right winger Nathan MacKinnon off for high-sticking, San Jose converted its second straight power play in less than 40 seconds of man-advantage time. Irwin's blast from the left point eluded Varlamov, who was screened by Marleau at 13:02.
The Avalanche took advantage of early mistakes by the Sharks to take a 2-1 lead into the first intermission.
It took the visitors 41 seconds to convert the game's first power play into a 1-0 lead. With San Jose right winger Tommy Wingels off for tripping MacKinnon, it was the Avalanche rookie who capitalized on the penalty he drew.
MacKinnon sent a wrong-foot wrist shot from above the right circle that deflected off the stick of penalty-killing Shark center Andrew Desjardins and past Niemi at 11:05.
The Sharks evened the score by converting their first power play minutes later, breaking an 0-for-12 drought over the previous four games in the process. Defenseman Jason Demers one-timed a Thornton feed past Varlamov at 13:59, just 38 seconds after Andre Benoit elbowed James Sheppard.
Avs captain Gabriel Landeskog scored in the final minute of the period when San Jose defensemen Marc-Edouard Vlasic and Demers got caught out of position while the forwards had a bad change following an extended possession in the Colorado end.
"It was a strange game probably from the perspective of both teams," Johnson said. "A very strange game at the end."
Varlamov made 41 saves in regulation and overtime. Niemi stopped 29 shots.
NOTES: Sharks LW Tomas Hertl will undergo a surgical procedure next week to determine the extent of damage to his right knee. He was hurt Dec. 19 when he collided with Los Angeles Kings RW Dustin Brown. Initially thought to be out a month, Hertl will now miss more time, according to San Jose GM Doug Wilson. Hertl was the league's leading scorer among rookies with 15 goals and 25 points at the time of his injury. ... Colorado C Matt Duchene was named the NHL's third star of the week. He had nine points in four games, including four consecutive multiple-point performances. ... RW Raffi Torres (right ACL surgery) and RW Adam Burish (back surgery) remain out for San Jose. RW Alex Tanguay (sprained knee) was out for Colorado. ... The Sharks and Avalanche play twice more, with both games at Pepsi Center, Jan. 4 and March 29.