Canada will head to the IIHF 2017 World Junior Championship gold medal final on Thursday night after a hard-fought 5-2 win over Sweden on Wednesday at Montreal’s Bell Centre.

It was Sweden’s first loss of the tournament, condemning the Scandinavian nation to the bronze medal game against Russia. Canada was led by two goals from Julien Gauthier, including the game winner and tremendous goaltending in relief from Carter Hart. Thursday’s final against the United States will give Canada a shot at its 17th World Juniors title.

RELATED: Canada 5-3 Russia | Canada 5-0 Slovakia | Canada 10-2 Latvia

Fans at the Bell Centre were treated to an eventful opening 10 minutes with three goals that came within a space of 120 seconds of hockey.

Shorthanded, Sweden opened the scoring on only its second shot (both coming during the same penalty kill) of the game at 6:05, courtesy of Joel Eriksson Ek firing one by Connor Ingram in the Canada goal from above the right faceoff circle blocker side to make it 1-0.

It took a minute and 38 seconds for Canada to respond, with Mitchell Stephens opportunistically burying the puck past Sweden goaltender Felix Sandstrom for the 1-1 score, after a bouncing puck found its way to the top of the crease.

RELATED: Canada 1-3 USA | Canada 5-3 Czech Republic

Another 22 seconds would go by before Sweden was back out front 2-1. Carl Grundstrom on a partial breakaway hand his glove tapped by Canadian defenceman Kale Clague. Ingram was already sold on a change of direction as the contact helped guide the puck right through the Canadian goaltender.

That was the end of Ingram’s night in goal. Seemingly rattled, he was replaced by Hart, who provided stability quickly thwarting a Swedish power play within two minutes of his entrance. Hart stopped all 28 shots he faced since relieving Ingram.

Grundstrom’s good fortune ended at 18:40 of the first when he took a poor penalty after a stoppage, ending his country’s power play and the teams were set to play 4-on-4 for over a minute.

Only nine seconds from the next faceoff won by Anthony Cirelli, the puck came back around to the Canadian centreman, who let one rip from the left faceoff circle, a rising puck fooling Sandstrom before making it 2-2. The goal was Cirelli’s third of the tournament and second point of the night having assisted on Stephens’ earlier tally.

An action-filled first period ended with Sweden outshooting Canada 16-12.

The second period was just as fast-paced as the first although with fewer goals, thanks to some great goaltending and defending.

Sandstrom robbed Tyson Jost twice on back-to-back saves in the second period, first stopping him cold with his left pad, then robbing him on the rebound with the glove when the Canadian got two shots away uncontested.

Hart too was sharp in the Canadian net stopping all 11 Swedish second period shots. He got some some great help from defenceman Dante Fabbro, who tucked a rolling puck from the goal line into Hart’s glove with Sweden looking for a third.

The lone goal of the second period that put Canada up 3-2 arrived at 12:02 from Gauthier, his first of two. Standing in front of the Sandstrom, Gauthier pushed the puck toward goal. The Swedish goaltender thought he had the puck. Still loose, the puck was eventually nudged over the line by Gauthier against a protesting Sandstrom.

The third period was dominated by Canada in the offensive zone, applying pressure on Sweden until Dylan Strome scored the fourth goal for the 4-2 lead. Strome snapped it home standing between the blue line and the right faceoff circle, with a screened Sandstrom not seeing the puck until it was behind him.

A fifth tally arrived on an empty from Gauthier with 1:58 to go, his second of the game and fifth of the tournament making it 5-2.

Canada will play the United States, the only team that’s beaten the Canadians at 2017 World Juniors, in the gold medal final on Thursday night at 8 p.m. ET in Montreal.

USA defeated Russia 4-3 in a thrilling game that ended in a shootout earlier on Wednesday.

Sweden and Russia will play for bronze on Thursday at 3:30 ET in Montreal.