Defending champions Norway lost their final group game of the women's Olympic handball tournament, meaning they will now face tough opponents Brazil in the quarter-finals.
Spain beat Norway 25-20 and will play Croatia in the quarter-finals.
Montenegro squeezed into the next round with a 25-25 tie against Russia, who had already advanced.
Katarina Bulatovic scored seven goals for Montenegro, who advanced thanks to Angola's 29-26 loss to Brazil.
Brazil topped Group A, while Angola was eliminated.
Also, Croatia defeated host Britain 37-14 in what was already a blowout by halftime.
Sonja Basic, Dijana Jovetic and Andrea Seric scored five goals each for Croatia, who had already gone through to the next round. Britain finished the tournament without a victory.
Ryu Eun-hee scored 10 goals for South Korea in their 32-28 victory over Sweden, who finished last in Group B with a record of 0-5.
In Sunday's late match, France beat Denmark 30-24 thanks to six goals from Nina Kamto Njitam.