Defending champion Canada had to recover from an early scare before rallying to beat Finland 5-3 for its fifth victory from five games at the ice hockey world championship on Saturday.
Captain John Tavares set up the winning goal with his second assist with 8:28 remaining in the final period, finding Brandon Hagel at the left post to score into an open net. It was only the second shot on goal for Canada in the period.
Dawson Mercer finished it off with an empty net goal with 20 second left.
Canada joined Switzerland atop Group A and both sealed a playoff-round spot.
Also for Canada, Owen Power scored a goal and added two assists, Dylan Cozens had a goal and an assist and Brandon Tanev scored. Jordan Binnington stopped 29 shots.
Jesse Puljujarvi led Finland with two goals and Valtteri Puustinen got the other.
Canada was two goals down early in the first after Finland scored in a span of 2:16. Puljujarvi scored off a rebound 1:35 in, and Puustinen doubled the advantage on a power play.
Canada needed 97 seconds to tie it at 2.
Andrew Mangiapane seized the puck behind the goal before passing it to Cozens to net from the slot. Then Tavares seized the puck in his own half before skating down the left before feeding Brandon Tanev to knock in the equalizer from the crease.
Sweden killed off a 5-minute major before scoring three goals in a 26-second span in the middle period to pull away from Latvia in a 7-2 win that clinched a playoff-round berth.
The Swedes, who have not trailed in the tournament, preserved their perfect record through five games to lead Group B.
Latvia pulled even at 2-2 in the second in Ostrava but failed to capitalize after Rasmus Dahlin received a 5-minute major and game misconduct for charging. The defenseman opened the scoring for Sweden in the first period.
Fabian Zetterlund then scored twice in a 17-second span. Nine seconds later, center Joel Eriksson Ek netted to make it 5-2. Marcus Johansson had a goal and two assists.
In Prague, Switzerland routed Denmark 8-0. Winger Kevin Fiala scored two goals and had an assist.
Center Nico Hischier opened the scoring and added two assists to leave the Danes in danger of not advancing.
In Group B, Germany beat winless Poland 4-2 for a fourth win.
Later in Group A, the Czech Republic faced Britain, which is winless but has been competitive as it tries to avoid a last-place finish and relegation. France took on Slovakia.