The South African sevens rugby team beat Australia 21-19 in their Men's 5-8 Placing match at the Tokyo Olympics on Wednesday.
The Blitzboks, who suffered a disappointing 19-14 defeat to Argentina in the quarter-finals on Tuesday, bounced back with a consolation win over the Aussies.
Ronald Brown scored a brace, while skipper Siviwe Soyizwapi and JC Pretorius also dotted down.
The South Africans led 17-0 at half-time and had to fend off a gallant Australian fightback in the second period.
South Africa will now play the USA (10:00 SA time) on Wednesday for the chance to finish fifth in the tournament. The Blitzboks beat the Americans 17-12 in pool play on Tuesday.
New Zealand and Fiji will contest the Gold medal match (11:00 SA time) after the Kiwis thumped Great Britain 29-7 in the semi-finals and the Fijians cruised past Argentina, winning 26-14.
Tries: Ronald Brown (2), Siviwe Soyizwapi, JC Pretorius
Conversion: Justin Geduld
Tries: Lachie Miller, Josh Turner, Maurice Longbottom
Conversions: Miller, Longbottom