Rick Nash scored midway through the final period to lift Canada to a 5-4 victory over Slovakia on Wednesday and the Group C preliminary round title at ice hockey's World Championship.
In Moscow, defending world and Olympic champion Sweden scored five goals in the second period to wrap up first place in Group A with a 6-0 win over Switzerland.
Earlier, Jason Cirone scored late in overtime to help Italy defeat Latvia 4-3 and avoid the relegation round, while Michael Wolf scored twice to lead Germany to a 5-3 victory over Norway and also avoid the relegation stage.
Canada was clearly more energized than when it scraped past Germany 3-2 and took an unconvincing 4-2 win over Norway, converting three of four power-play opportunities.
Nash tipped in Cory Murphy's slap shot from the blue line past Slovak goaltender Jaroslav Halak stickside at 9:02 in the third period to keep Canada's record intact at 3-0.
"It was good to get the tip in. It's pretty exciting to get the win," Nash said. "It was our biggest game of the tournament. Our special teams were key."
Miroslav Satan pulled Slovakia even 4-4 3:38 into the final period.
In the second period, Canada took a 3-1 lead when Jamal Mayers one-timed a clean pass from Jason Chimera just 25 seconds after the opening faceoff, and Eric Brewer flicked the puck into the top corner of Halak's net on a perfect pass from Jonathan Toews 11 minutes later.
Marian Hossa brought the Slovaks within one at 13:48, dodging Canadian goalkeeper Dwayne Roloson's attempted poke check and scoring into a gaping net as the sprawling goalie remained helpless. Less than two minutes later, Dan Hamhuis tipped the puck in over Halak's right leg during a goalmouth scramble to widen the gap to 4-2.
Marek Uram prevented the North Americans from getting too far ahead with a breakaway goal, eluding Canada's latest arrival Dion Planeuf before beating Roloson over the shoulder at 17:37.
Slovakia led early on a power-play goal just 2:05 into the game, when Milan Jurcina's shot from the point through traffic beat Roloson. But Canada equalized 1:34 later on a power play of its own with Murphy one-timing the puck over Halak's glove.
"We definitely gave them too many power-play opportunities and they used them," Satan said. "Against the U.S. we're definitely going to have to be more disciplined."
Canada next plays Belarus on Friday. Slovakia, second in Group C, plays the United States on Thursday.
Martin Thornberg opened the scoring for Sweden one minute into the second when a pass from Tony Martensson from behind the net bounced off his leg and past Swiss goalie David Aebischer.
Defenseman Anton Stralman scored a power-play goal at 3:46, splitting the Swiss defense and putting a wrist shot past Aebischer's glove side to make it 2-0.
Patric Hornqvist added another power-play goal at 4:43 and Johan Davidsson scored twice before the second intermission.
Rickard Wallin scored seven minutes into the third to complete the rout for Bengt-Ake Gustafsson's team.
"After the first period we talked about going to the net more and creating more chances," said Wallin. "We were able to do that. They didn't stand up well in the second and that was the difference."
Sweden, with only one NHL player on its roster, will play Denmark in the qualification round on Thursday.
Sweden goaltender Johan Backlund faced only eight shots on his way to the shutout.
Switzerland finished second in Group A and will play Finland on Thursday. Italy will face host Russia on Friday in the qualification round. Germany faces the Czechs on Thursday while Latvia, Norway, Ukraine and Austria head to the relegation round.
Cirone took a pass from Andre Signoretti off his skate and beat Latvian goaltender Sergejs Naumovs with 50 seconds remaining in the five-minute overtime period to give Italy the victory. The Italian led 3-2 before Lauris Darzins tied it with 1:51 remaining in regulation.
In the other game, Wolf's second goal sparked a three-goal spurt in 8 1/2 minutes in the second period that rallied Germany from a 3-2 deficit against Norway.
AP sports writer Jim Armstrong in Moscow contributed to this report.