Stelio Mattheos helped Team Canada avoid an upset at the 2017 IIHF Under-18 World Championship.

The Brandon Wheat Kings forward snapped a shot top shelf on Slovakia goalie Jakub Kostelny to lift Canada to a 4-3 win in their second game at the world championship.

Mattheos had two goals in Canada's, which came in front of a packed house in Poprad, Slovakia.

Moose Jaw Warriors defenceman Josh Brook finished with four penalty minutes, while fellow Warrior Jett Woo was held off the score sheet in another well played game for the two defencemen.

Slovakia scored first with a power play goal from Adam Liska with 8:37 gone in the opening frame.

The tightly played period looked like it was going to finish with Slovakia in front, but Canada exploded for three goals in 1:31 span to end the period.

Kyle Olson and Mattheos scored 18 seconds apart and then Isaac Ratcliffe capped off the offensive outburst with just 11 seconds to go in the first period to put Canada in front 3-1.

Slovakia benefited from some Canadian penalty trouble in the second period and out-shot Canada 10-5 in the frame.

The Slovaks were able to pull within one late in the second when Patrik Hrehorcak found the back of the net with just over three minutes to go in the period.

Liska's second of the game tied up Slovakia with Canada just 2:38 into the third period. Canada controlled the rest of the period, out-shooting them 15-6, but they couldn't find the go-ahead goal.

Early in the overtime frame, Mattheos was sprung down the wing by defenceman Jared McIsaac where he lifted in the game-winner for Canada.

Prince Albert Raiders goalie Ian Scott made 26 saves in the win for Canada.

The Canadians will return to the ice on Monday against Switzerland. Puck drops at 9:30 a.m.

So far, Canada and Finland are tied at 2-0 on top of Group A, while the United States is leading Group B at 2-0 with the Czech Republic, Russia and Sweden are all tied at 1-1.