Carter Hart was all set to spend a third straight game on the bench when he was suddenly called upon to save Canada's gold-medal hopes at the world junior hockey championship.

When Connor Ingram gave up two goals on his first three shots, Hart was thrust into the action and stopped all 28 shots he faced as Canada defeated Sweden 5-2 in their semifinal on Wednesday night.

"I was pretty excited and I was pretty lucky that it was early in the game," said Hart, who began the tournament as Canada's No. 1 goalie but lost the starting job to Ingram. "My gloves were still sweaty from warmup so I wasn't too cold going in there."

"It really just matters how you prepare before the game. You prepare like you're playing."

Hart gets nod against U.S.

Coach Dominique Ducharme, who doesn't usually say in advance who will play in goal, confirmed that Hart will be back in the net when Canada faces the United States in the gold-medal game on Thursday night. Sweden will face Russia for the bronze medal.

"He was ready and he had a great game," Ducharme said of Hart. "He came in and made a few saves off the bench, felt good and got better and better. He had a perfect night."

Canada's plan was to give a physical test to Sweden, which had won its first five games but had yet to face a top-level opponent. The Canadians took the body at every opportunity, which took some of the starch out of the quick-footed Swedes.

It all seemed to be working, except that Sweden took an early 2-1 lead.

Joel Eriksson Ek scored shorthanded at 6:05 with a wrist shot on a rush down his off wing. Canada's Mitchell Stephens got it back when he banged in the rebound of Cirelli's wrap-around attempt at 7:43, only to see Carl Grundstrom score a soft one when he lost control of the puck on a drive to the net. The puck slid under Ingram at 8:05 for Sweden's second goal.

93947624

Sweden's Carl Grundstrom scores on Connor Ingram in the first period, chasing the Canadian goaltender from the net. (Minas Panagiotakis/Getty Images)

Ingram gets early hook

That's when Ingram got the hook and Hart, who had been so-so in two group stage starts last week, went into the game and shut the door the rest of the way, although he had a hairy moment in the second period when a shot went off his glove but video review showed it didn't quite make it across the goal line.

"I took it one shot at a time and just worried about stopping the next one," said Hart. "It was fun to be part of, but now we have to prepare for [Thursday]."

Cirelli, who had two assists in Monday's quarter-final win over the Czech Republic, had a goal and an assist in the first period. But coming up big in important games is not new for the player who scored in overtime in the 2015 Memorial Cup final for the Oshawa Generals.

"I'm not sure what it is — I just try to play a simple game and create some energy," said Cirelli, who won a faceoff in the Swedish zone and scored on a high shot to tie the game at 18:33 of the first period.

Gold-medal rematch

Julien Gauthier, with a second straight two-goal game, and Dylan Strome also scored for the Canadians, who are seeking a second gold medal in three years.

Julien Gauthier: 'We just want the gold'1:11

Sweden is in danger of being shut out of the medals for a third straight year.

93948061

Team Canada captain Dylan Strome celebrates his third-period goal against Sweden during their semifinal Wednesday in Montreal. (Minas Panagiotakis/Getty Images)

"It's really important — it will be much better to get home to Sweden with a medal," said Grundstrom.

Canada lost 3-1 to the Americans in group stage play on Dec. 31 and will need to be sharper in the rematch.

The U.S. topped Russia 4-3 in a shootout in the other semifinal.

"We're playing for the gold medal," said Ducharme. "We knew we'd be playing against a good team."

"It could have been another team. You don't get the motivation from who you're playing against. You're playing for gold, and just that is enough. We're going to be thinking about ourselves."

The U.S. beat Canada the last two times they met in a world junior final; in 2010 in Saskatoon and 2004 in Helsinki.

Turning point

Grundstrom was the goat as he took a cross-checking penalty while Sweden was on a power play to set the stage for Cirelli's goal.

Canada charged out for the second period and got a goal from sheer pressure as Gauthier poked at Felix Sandstrom's pad and the puck went in at 12:02.

Then Sandstrom made perhaps one of the most spectacular saves of the tournament so far as he robbed Tyson Jost twice from close range at 13:00.

It wasn't enough to turn momentum in Sweden's favour however, and Strome scored from the left circle with the teams each down a man at 7:38 of the third.

Sweden had pulled Sandstrom for an extra attacker when 16-year-old Rasmus Dahlin gave up the puck at the blue-line and Gauthier scored into the empty net at 18:02.