Latvia defeated previously unbeaten Switzerland to reach the last eight of the Ice Hockey World Championship before their home fans in Riga ©Getty Images

Hosts Latvia claimed a 4-3 overtime win over previously unbeaten Switzerland to book their place in the quarter-finals of the Ice Hockey World Championship.

On the final day of group games, the home side knew they needed a point at Arena Riga to cling onto the top four spot required to qualify for the last eight.

That was the case after Slovakia had beaten Norway 4-1 earlier in the day to temporarily jump into a quarter-final position, but the hosts did their job against a Swiss side which had previously won all six of their games and have gone through as group winners.

Kaspars Daugaviņš was the hero for Latvia as he netted an equaliser six minutes from time before a raucous crowd of 9,178 to make it 3-3 and send the game to overtime - earning the hosts the point they needed in Group B.

Rūdolfs Balcers then added extra gloss by winning the game with a goal on the powerplay, lifting his team up to third.

Goals from Ralfs Freibergs and Rodrigo Ābols had twice put Latvia in front, either side of a Kevin Fiala goal for the Swiss.

Marco Miranda levelled for Switzerland and Andres Ambühl put them in front with seven minutes left to leave Latvia on the brink of elimination.

Daugaviņš responded just 32 seconds later, however, after getting on the end of an Ābols assist.

Slovakia's victory over Norway briefly put them in a qualifying sport for the quarter final but was in vain after the later Latvian success ©Getty Images
Slovakia's victory over Norway briefly put them in a qualifying sport for the quarter final but was in vain after the later Latvian success ©Getty Images

"It wasn't for free," said Freibergs.

"It was good hockey the whole way, but when it was closer near the end we wanted that goal and that one point. 

"When it was 3-2, we didn't panic. 

"We played great.

"Right moment, right time, we scored. 

"We needed it for the fans. 

"In the country, times are tough, the economy. 

"They needed something positive."

Goals from Marek Hrivík, Peter Cehlárik, Róbert Lantoši and Richard Pánik helped Slovakia past Norway but their efforts were in vain as they finished fifth.

Markus Vikingstad netted for already eliminated Norway who could not follow up their famous win over Canada yesterday.

Canada finished second in the group and bounced back from that setback by beating the Czech Republic 3-1, although the Czechs are also through.

Peyton Krebs gave Canada the lead before the Czechs levelled through Martin Kaut.

Goals from Tyler Myers and Lawson Crouse sealed victory for the Canadians who go through behind the Swiss.

The Czech defeat saw them end on the same points as Latvia, but the hosts leapfrogged them into third after beating them earlier in the tournament.

United States saw off Sweden in overtime of a top-of-the-table clash to win Group A in Tampere ©Getty Images
United States saw off Sweden in overtime of a top-of-the-table clash to win Group A in Tampere ©Getty Images

In Group A at Nokia Arena in Tampere, the United States beat Sweden 4-3 after overtime in a contest to decide who finished top.

Leo Carlsson put Sweden ahead but the undefeated US then scored three unanswered goals through Nick Bonino, Conor Garland and Lane Hutson.

Sweden set up a dramatic finish by striking twice in the last six minutes, with Carlsson netting again and Timothy Liljegren levelling to send the match to overtime in front of 8,781 fans.

Dylan Samberg settled the contest for the US with a roofed finish less than two minutes into the extra period, with Sweden having to settle for second in the group.

Co-hosts Finland, the defending champions, finished third after thrashing Denmark 7-1 before a crowd of 11,491.

The Danes still had hopes of reaching the last eight but conceded three goals in both of the first and second periods.

Marko Anttila, Atte Ohtamaa, Ville Pokka, Hannes Björninen, Juho Lammikko, Kasperi Kapanen and Nikolas Matinpalo all scored for Finland with Nikolaj Ehlers adding the consolation for Denmark.

Germany thrashed eliminated France 5-0 to ensure they went through in fourth.

Denmark would have needed to win and France to do them a favour in order to progress, but Alexander Ehl, Frederik Tiffels, JJ Peterka, Daniel Fischbuch and Maximilian Kastner all scored for the Germans.

The quarter-finals are scheduled for Thursday (May 25).

Switzerland are scheduled to play Germany in Riga, where Latvia will meet Sweden.

In Tampere, the US are due to play the Czech Republic and Finland host Canada.