12/23/2015 14:49 EST | Updated 12/23/2016 00:12 EST

Marner's goal caps scoring in wild game as Canada salvages 7-6 win over Sweden

IMATRA, Finland — Mitch Marner scored with less than four minutes to go to cap the scoring in a wild third period, and Canada edged Sweden 7-6 Wednesday in its last exhibition match before the world junior hockey championship.

Canada led 5-1 heading into the third, before Sweden lit up Canada goaltender Mason McDonald with five goals over the final 20 minutes.

Marcus Pettersson's second goal of the period at 15:26 tied the game at 6-6 before Marner's goal salvaged the win for Canada.

McDonald recovered to make some big saves over the final minutes with Sweden pressing for the tying goal.

Vancouver Canucks forward Jake Virtanen had two goals for the Canadians, with Dylan Strome, Mitchell Stephens, Haydn Fleury and Brendan Perlini also scoring.

Oskar Lindblom, Jacob Larsson, Axel Holmstrom and Adrian Kempe had Sweden's other goals.

The Canadian Press