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 totally 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 vastly 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 levelled before the end of the period through left winger Frederik Storm and centre Morten Poulsen, and won the match 3-2 when Peter Regin scored in overtime off a pass from Nikolaj Ehlers.

"We were extremely tired, but Nik is one of the fastest skaters in the world and he somehow created a two-on-one for us," Regin said, describing his winner. "I was lucky to get a break and put it five hole."

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.

Germany is three points behind fourth-place Latvia ahead of their crucial match on Tuesday at the Lanxess arena.

At least Germany will be strengthened by the arrival of rising star Leon Draisaitl, whose hat trick for the Edmonton Oilers against the Anaheim Ducks last Sunday was the first by a German-born player in the NHL playoffs.

"Leon will help us a lot. He had an incredible year in the NHL for such a young player," Germany forward Felix Schutz said. "He's the best German player we've ever had. He's going to give us some offence and on the power play."

Earlier in Group B, centre Roman Horak scored twice as the Czech Republic beat Slovenia 5-1. Right winger Michal Repik, defenceman Michal Kempny and centre 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.

Centre 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, defencemen 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.