PARIS -- Stephane Da Costa saved France in a tense 4-3 shootout win against Belarus that kept its quarterfinal hopes alive, while co-host Germany lost to Denmark in overtime at the ice hockey world championship on Friday.

With the top four from each group going through to Thursday's quarterfinals, Germany was in fifth place in Group A and France at sixth in Group B.

Belarus rallied from 2-0 down and led 3-2 in regulation before co-host France equalized with about seven minutes remaining to force overtime in front of a nervous home crowd in Paris.

France rode its luck, however, as Belarus hit the post at the end of regulation and right at the start of overtime, and then blew the chance to win the shootout when France missed twice.

With France trailing 1-0 in the shootout, veteran goaltender Cristobal Huet saved from Andrei Stas and -- after Da Costa kept France in it with an assured finish -- made another stop from Alexander Pavlovich to send the match into sudden death.

With the shooters reversed, Belarus went first and Mikhail Stefanovich -- who put Belarus ahead in the shootout -- was foiled by the experienced Huet. Up stepped Da Costa and he confidently drew goalie Kevin Lalande before slotting through his legs for another composed shot under pressure.

The nerveless Da Costa also scored the shootout winner against Switzerland on Tuesday.

Germany also led 2-0 in Cologne, scoring twice inside a minute during the first period through wingers Patrick Reimer and Brooks Macek.

But the Danes leveled before the end of the period through left winger Frederik Storm and center Morten Poulsen, and won the match 3-2 when Peter Regin scored in overtime.

Germany did not start first-choice goalie Thomas Greiss for the must-win game, despite Greiss making 42 saves last Friday to help beat the United States 2-1.

Earlier in Group B, center Roman Horak scored twice as the Czech Republic beat Slovenia 5-1. Right winger Michal Repik, defenseman Michal Kempny and center Roman Cervenka also scored.

The win moved the 2010 champion into second place in Group B, two points behind leader Canada, which is chasing a third straight title.

Center Elias Lindholm scored his fifth of the tournament as nine-time champion Sweden moved up to second in Group A by crushing last-placed Italy 8-1.

Sweden's other goals came from Victor Rask, defensemen Philip Holm and Jonas Brodin, Linus Omark, Carl Klingberg, Joel Eriksson Ek and John Klingberg. Center William Nylander had three assists while Lindholm assisted Rask.