TOKYO (Reuters) - Defending Olympic champions Denmark finished as Group B winners despite crashing to a shock 33-30 loss to Sweden in the men's handball competition at the Yoyogi National Stadium on Sunday and will face Norway in the quarter-finals.
In a rematch of their world championship final this year which the Danes won for their second straight title, it was Sweden who dictated terms as Jonathan Carlsbogard and Lukas Sandell scored six goals each to earn a measure of revenge.
The defeat ended Denmark's perfect record in Tokyo as they finished with eight points after four victories from their five matches, level on points with second-placed Egypt and third-placed Sweden.
Spain will face Sweden in the quarter-finals on Tuesday after the European champions finished second behind France in Group A with eight points after a 36-27 victory over winless Argentina earlier on Sunday.
"Now we're at the place we wanted to be," Spain goalkeeper Gonzalo Perez de Vargas said. "Of course the next step is going to be tougher than the group phase but we're confident and over the last five years we have created a great team spirit.
"We know how to win at key moments and we're looking forward to the quarter-finals."
Rio 2016 runners-up France also ended their group campaign with eight points after a 32-29 defeat at the hands of Norway and will take on Bahrain in the last-eight stage.
"Bahrain play a different kind of handball. They're very efficient and they almost won against Sweden, who are the second best team in the world," France's Nikola Karabatic said.
"So we know it's going to be a tough game."
Germany overcame Brazil 29-25 to set up a meeting with dark horse Egypt.
Bahrain suffered their fourth defeat in five matches as Egypt thrashed Aron Kristjansson's side 30-20 with Ahmed Elahmar scoring five goals and Omar Elwakil, Seif Elderaa and Ahmed Mesilhy all netting four each.
"If you want to go for a medal, you're going to face the toughest opponents," Egypt's 37-year-old right back Elahmar said. "This will be my last Olympics... I'm looking forward to ending on a high."
Japan scored four goals in the final three minutes to seal a 31-30 victory over Portugal to make it a three-way tie between the two teams and Bahrain, but it was the Gulf country that sealed a last-eight spot due to a better goal difference.
(Reporting by Shrivathsa Sridhar in Bengaluru; Editing by Hugh Lawson)