Kevin Porter quickly turned an awful night into an awfully good one.
The forward collected the puck near the center line, flew past Sharks defenseman Kent Huskins and then beat goalie Antero Niittymaki with a low shot just as Porter tumbled to the ice.
He kept on sliding, his teammates quickly joining him for the celebration.
"We knew we were going to win once we got into overtime," Porter said.
Porter's goal capped off an improbable comeback -- and saved him from slipping into coach Joe Sacco's dog house. Sacco was irritated with Porter over a few early turnovers, even having words with him.
"I let him know about them," Sacco said. "I thought he needed to respond and I thought he did."
Early on, the Avalanche were struggling to get anything going against Niittymaki, who faced just 22 shots all night.
This from a Colorado squad that's averaging 3.41 goals a game, the second-highest mark in the league.
The momentum began to shift early in the third period when Jamie McGinn's goal was disallowed after officials ruled he batted the puck in with a high stick.
A video replay upheld the referee's decision and the score remained 3-1.
It's a non-goal that would come back to haunt San Jose.
Chris Stewart made it 3-2 midway through the period and Paul Stastny scored the equalizer 6 minutes later on a feed from Stewart.
Peter Budaj ensured the game went into overtime as he turned back a flurry of shots in the closing seconds of regulation.
"Sometimes, you're not supposed to win and your goalie makes a lot of saves, you kill a lot of penalties, you forecheck and you get the goal," Stastny said.
And quite a goal at that, in Stastny's opinion.
"Awesome play," Stastny said. "(Porter) was just flying with the puck."
Kevin Shattenkirk also scored for the Avalanche, his first NHL goal. The way the game ended made the achievement all the more memorable.
"We came back in the third and took it to them," Shattenkirk said.
Logan Couture, Dan Boyle and Mike Moore added goals for the Sharks, who had their winning streak halted at three games.
"I was happy with our guys, believe it or not," said Sharks coach Todd McLellan, whose team tied a season high with 43 shots on goal. "We lost the game and that's the real disappointing thing. But for the most part I thought we played a real solid game. They scored a couple goals at fortunate times for them."
Moore was called up before the game from Worcester of the American Hockey League. He scored his first NHL goal on a shot that trickled through the pads of Budaj in the second period, giving San Jose a 3-1 lead..