Nail Yakupov scored a hat trick as Russia denied Canada a medal with a 6-4 win in the bronze-medal game at the world under-18 hockey championship Sunday.

Canada led 2-1 until Russia scored four unanswered goals in the second period including a short-handed goal by Yakupov.

Canada pulled goaltender Andrew D’Agostini in the final minutes of the third and the move paid off when Brett Ritchie scored to close the gap to one goal.

But Yakupov scored an empty-net goal with four seconds left to seal the medal for Russia.

Ryan Murphy, Alan Quine and Ryan Murray each had singles for Canada, while D’Agostini made 27 saves.

Nikita Kucherov scored twice and Vladimir Tkachev added one more for the Russians, who got a stand-out performance from goalie Andrei Vasilevski with 38 saves.

The fourth-place finish is another disappointment for Canada, which placed seventh at last year’s event in Minsk and Bobruisk, Belarus. Canada last won the gold in 2008.

The United States and Sweden played for the gold medal later Sunday.