Colorado goalie Hunter Miska looked like he was cruising to his first NHL victory and shutout until the final two minutes on Friday night.

That's when things got way more interesting than Miska — or the Avalanche — were expecting.

But the 25-year-old Miska refocused, turned away a final Arizona offensive flurry and the Avalanche held on for a 3-2 victory over the Coyotes to snap a two-game losing streak.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

"That last 52 seconds was super nerve-wracking," Miska said. "But the team was playing super well in front of me and I just had to stop the puck."

Miska was playing in just his fourth NHL game and was nearly flawless until the Coyotes scored two goals in the final two minutes. Arizona had a sleepy offensive performance before Phil Kessel scored with 1:36 left and Drake Caggiula added another one with 53 seconds left.

That led to a tense exchange in the final seconds before the Avalanche fended off a final Coyotes offensive push. Avalanche coach Jared Bednar said Miska played great until getting jittery in the final minutes.

"I thought he looked really good for the bulk of the game and then he got caught out of the net a couple times at the end," Bednar said. "It looked like he got nervous, he was getting ready to get a big win and then got a little ahead of himself."

"He made it a little more interesting than it needed to be."

Colorado's Nazem Kadri had a goal and two assists to lead the team's offense.

The Avalanche jumped ahead 1-0 early in the second period on a power play when Mikko Rantanen scored from close range at the far post after a quick crossing pass from Kadri. It was Rantenen’s eighth goal of the season.

Colorado pushed ahead 2-0 early in the third when Andre Burakovsky beat Hill with a hard shot to the top right corner. It was his fourth goal of the season. The Avalanche added another goal later in the third when Kadri slipped his sixth goal of the season past Hill into the bottom left corner of the net.

The Coyotes came into the game on a roll, becoming just the eighth NHL team to win consecutive games after trailing by at least three goals. They nearly pulled it off again in shocking fashion, but waited too late to get the offense started.

Coyotes coach Rick Tocchet said his team had too many players who didn't contribute.

"They are a talented big team and they’re a better team than us," Tocchet said. "So for us to compete you can’t have passengers. You guys can write your own narrative, but we had too many guys that had zeros tonight. Against this team, you can’t have five or six guys with just zeros. We had some guys competing, but we had some guys that didn’t compete."

Arizona goalie Adin Hill made his first start of the season in place of the injured Darcy Kuemper, who was out with a lower body injury that happened during the team's win on Wednesday. Hill stopped 14 shots in the come-from-behind victory after replacing Kuemper.

Hill played well again in a scoreless first period, stopping 11 shots, including a handful at close range. Things got chippy late in the first period when Colorado's Gabriel Landeskog slammed Arizona's Conor Garland to the ice. Both were assessed a minor roughing penalty.

Kessel's goal was his eighth of the season. Hill stopped 25 of 28 shots.

CLICK HERE TO GET THE FOX NEWS APP

OUCH

Linesman Brad Kovachik took a puck to the side of the head midway through the first period and had to leave the ice. The game went on with two referees and one linesman until he returned in the second period.

UP NEXT

The teams meet again in Arizona on Saturday night.