Ostrava, Czech Republic (SportsNetwork.com) - Jack Eichel's goal with 28 seconds remaining in overtime gave the United States a dramatic 5-4 win over Slovakia on Tuesday and also lifted the Americans to the top spot in Group B at the 2015 World Hockey Championship.

Eichel, the Hobey Baker winner as the top collegiate player in the U.S., snapped a shot from above the left circle past a screened Julius Hudacek for the winner.

The Americans finished atop Group B to set up a quarterfinal matchup on Thursday against Switzerland, the fourth-place finisher in Group A. A loss on Tuesday would have sent the United States into a quarterfinal against the host Czech Republic instead.

But Eichel, a freshman at Boston University, saved the Americans, who blew a 3-0 lead on Tuesday. Ben Smith and Seth Jones scored in the first period for the U.S., then Anders Lee made it 3-0 in the first minute of the second before the Slovaks roared back.

Slovakia had been eliminated from quarterfinal contention earlier on Tuesday when Belarus beat Norway and was playing only for pride. The Slovaks responded with four straight goals, the first by Marian Gaborik, before Charlie Coyle answered for the Americans in the final minute of the second to tie it at 4-4.

Each team had plenty of chances in a scoreless third period and early in the overtime before Eichel won it with his second goal of the tournament.

Earlier on Tuesday, Canada completed a perfect preliminary round schedule with a 10-1 rout of Austria and will next face Belarus in the quarterfinals.

Belarus qualified for the knockout round Tuesday with a 3-2 win over Norway to secure fourth place in Group B. Canada won each of its seven games to finish atop Group A.

The Canadians dominated from start to finish on Tuesday, scoring four times in the first period, twice in the second and four times again in the third. Matt Duchene and Jason Spezza led the effort with two goals and two assists apiece, while Nathan MacKinnon and Jordan Eberle each tallied a goal and an assist.

Belarus had its fate in its hands with an early game Tuesday and opened a 3-0 lead a little over halfway through the contest, then held on as Norway scored twice to make it close. Alexei Kalyuzhny had a hand in all three tallies for Belarus, notching a goal and two assists. Andrei Kostitsyn had the third goal, which proved to be the difference.

Also Tuesday, France avoided relegation with a 3-2 shootout win over Latvia in Group A. France, Latvia and Austria all finished with five points, but Austria will drop out of the world group after losing to both Latvia and France during the preliminary round.

Finland beat Russia 3-2 in a shootout to earn the second seed in Group B and will face the Czech Republic on Thursday. Russia dropped to third in Group B and will face Sweden in the quarterfinals.

The Czechs beat Switzerland 2-1 in a shootout on Tuesday.