Canada prevailed 4-3 over the United States in its IIHF World Championship semifinal that required a minor comeback.

A 2-0 Canadian first period lead in Russia on Saturday disappeared in a space of seven minutes and 11 seconds of the second, but with the Americans ahead 3-2, goals by Derick Brassard, and then Ryan Ellis in the third pulled Canada ahead 4-3 for good and a spot in Sunday’s championship final against Finland.

Ryan Ellis celebrates his game winning goal at IIHF worlds semifinal with Mark Scheifele on May 21, 2016.

Ryan Ellis celebrates his game winning goal at IIHF worlds semifinal with Mark Scheifele on May 21, 2016.

Canada’s other goals came from Brendan Gallagher and Brad Marchand.

Gallagher opened the scoring in typical fashion, buzzing around the net before popping in a loose puck past U.S. goaltender Keith Kinkaid 8:59 into the first period for a 1-0 lead to Canada.

Marchand doubled the advantage to 2-0 when he beat a sprawling Kinkaid from the side of the net, after accepting a return pass from Cody Ceci with less than two minutes to the first intermission.

RELATED: Canada advances to semifinals at hockey worlds

Derick Brassard scores against USA at the IIHF worlds semifinal on May 21, 2016.

Derick Brassard scores against USA at the IIHF worlds semifinal on May 21, 2016.

Having already beaten USA 5-1 to open the tournament, the thought of a rout may have crossed many minds in Moscow on Saturday. Such ideas were quickly erased.

USA had a  massive second period, getting a goal from Auston Matthews on the power play, then additional tallies from David Warsofsky and Tyler Motte to suddenly pull ahead 3-2 within 8:25 of the second period. Warsofsky’s goal had to be reviewed as it was unclear if it hit the crossbar or the back of the net behind Canadian goalie Cam Talbot. The correct call was made and the momentum seemed to rest with the Americans as they went on to take the lead.

Fortune favoured the Canadians again though at 14:40 of the second when Frank Vatrano tripped up Connor McDavid, causing the American to take a minor penalty. On the resulting power play, a Matt Duchene shot hit Corey Perry and Ryan O’Reilly before the puck bounced on to the stick of Brassard, who walked it into the open net for a 3-3 score with Kinkaid out of sorts and American penalty killers flailing on the ice.

RELATED: Perry could join elite ‘Triple Gold Club’

Corey Perry celebrates Ryan Ellis' goal at the IIHF World Championships semifinal against USA on May 21, 2016.

Corey Perry celebrates Ryan Ellis’ goal at the IIHF World Championships semifinal against USA on May 21, 2016.

In such a frantic game, the eventual game winning goal from Ellis arrived in an unlikely manner. During a routine line change Ellis took advantage of the open ice and lined up slap shot from just outside the face off circle to Kinkaid’s left that beat the keeper clean on the glove side to put Canada up 4-3.

Talbot made 11 saves in the third period (USA outshot Canada 33-27 overall) when the Americans came looking for the tying goal that wasn’t to be, as Canada booked its place in the final for the second straight year.

RELATED: Canada ends prelims with six wins, one loss
RELATED: Canada beats Russia for 2015 IIHF worlds gold

Finland's Sebastian Aho (right) celebrates his goal against Russia at IIHF worlds semifinal on May 21, 2016.

Finland’s Sebastian Aho (right) celebrates his goal against Russia at IIHF worlds semifinal on May 21, 2016.

Hockey Canada men beat Russia for gold in this tournament last year in the Czech Republic. This year will be the first time since 2005 that Canada take part in back-to-back finals of the men’s hockey worlds.

In the earlier semifinal Finland beat the host nation Russia 3-1 to secure its spot in the final. Finland last won the tournament in 2011 and will take some confidence into the final having defeated Canada in the preliminaries 4-0.

USA will play Russia for bronze. The Americans took the third place medal at the host nation’s expense last year in Prague and will face a similar scenario this year against the Russians in Moscow.

Canada has won this tournament 25 times. One more gold medal will put the Canadians a single behind USSR and Russia, which has a combined 27 IIHF men’s world championship titles.