Russia eventually came out on top after an epic battle with France
World champions Russia needed two overtimes to beat France and the reach Olympic women's handball semi-finals.
Russia, who went unbeaten in Group B, trailed 16-12 at half time but eventually came through 32-31 and will face Hungary for a place in the final.
The Hungarians caused a surprise by beating Romania 34-30.
In the other quarter-finals, South Korea beat hosts China 31-23 and now face Norway, who never trailed en route to overcoming Sweden 31-24.
Russia would have been shock quarter-final casualties were it not for Ekaterina Andryushina's goal in the last minute of regulation time, which tied the match at 24-24 and forced extra time.
In the first overtime, France, who scraped into the last eight having finished one point above Kazakhstan in Group A, made the early running but Yana Uskova drew Russia level.
Natalia Shipilova won it for Russia in the final minute, although France's Veronique Pecqueux-Rolland couldn't connect with a shot in the final seconds that would have forced a penalty shootout.
Bernadett Ferling and Monika Kovacsicz both scored seven goals for Hungary and, while Ramona Maier scored on 11 of 13 shots for Romania, the Hungarians' more balanced offensive strategy prevailed.
The Romanians had been unbeaten and looked good to make the final until ending their Pool A campaign with a one-goal defeat by the impressive Norwegians.
Norway never trailed Sweden in their quarter-final, Tonje Larsen and Else Marthe Soerlie Lybekk both scoring six goals as their side, who led 16-10 at half time, coasted to victory.
Park Chung-hee scored eight goals and Moon Pil-hee scored six as Korea enjoyed a similarly comfortable passage against China.