Japan celebrate reaching the semi-finals of the Olympic Sevens (Getty)
Deodoro - South Africa have advanced to the semi-finals of the Olympic Sevens after they beat Australia 22-5 in Wednesday night's quarter-final at Deodoro Stadium.
The Blitzboks will meet Great Britain in the second semi-final on Thursday.
And while that is excellent news for Team South Africa, the story of the night belonged to Japan, who continued their fairy-tale run at the tournament with a last-second quarter-final win over France.
Rosco Speckman and Seabelo Senatla scored fist half tries for the Blitzboks, but they were only up 10-5 at the break.
The second half was tense, but South Africa had some breathing room when skipper Kyle Brown crashed over to make it 15-5 before Cecil Afrika converted to make it 17-5. Senatla's second put it to bed in the closing stages.
New Zealand, meanwhile, were knocked out by Fiji, going down 12-7 to the tournament favourites after a dismal two days.
The Kiwis have now won just one of their four matches at the competition, which included losses to Japan and Great Britain in the pool stages.
The really big moment happened in the evening's second quarter-final when the Japanese scored in the last movement to secure a 12-7 win of their own to progress to the semi-finals in what is fast becoming one of the biggest underdog stories of the Games.
A semi against Fiji on Thursday awaits, but at the very least Japan will now be playing in the bronze medal match.
The third quarter-final was equally crazy, but for different reasons.
After full-time, Argentina and Great Britain were locked at 0-0.
It meant that the clash went to extra time, and it was Great Britain scored in sudden death the South Americans were left devastated.
Fiji 12-7 New Zealand
Japan 12-7 France
Great Britain 5-0 Argentina (AET)
SA 22-5 Australia
Thursday's semi-final fixtures:
Fiji v Japan - 14:30 (19:30, SA time)
Great Britain v SA - 15:00 (20:00, SA time)
TBC v TBC - 19:00 (00:00, SA time)