South Africa scored 20 unanswered second half points to deny Fiji back to back titles at the Singapore Sevens.
Aminiasi Tuimaba, Napolioni Bolaca and Vilimoni Botitu all found the tryline as Fiji flew into a seemingly unassailable 19-0 half-time lead in the Cup final.
But the Blitzboks roared back in the second spell, with Kurt-Lee Arendse, Angelo Davids and Ryan Oosthuizen dotting down to cut the deficit to two points with two minutes remaining, while Aminiasi Tuimaba was also shown a yellow card for a dangerous tackle.
Apenisa Cakaubalavu produced a try-saving tackle in the final minute only for Fiji to be penalised for offside as Selvyn Davids stepped up to slot the penalty goal and put South Africa in front 20-19.
Fiji won the restart and with time up Aminiasi Tuimaba attempted a kick and chase but the Blitzboks got to the ball first to clinch their second tournament victory of the season.
Despite letting the Singapore title slip away on a weekend where Fiji also suffered defeats by Scotland and South Africa in pool play, Gareth Baber's side closed the gap on overall series leaders the USA to just three points with two rounds to play in London and Paris, with England beating the Americans 28-7 in the bronze playoff.
Josua Vakurunabili, Meli Derenalagi, Aminiasi Tuimaba and Vilimoni Botitu were also selected in the Singapore Sevens Dream Team.
Meanwhile Samoa continued their strong form, beating New Zealand 19-17 in the fifth place playoff, having made the Cup quarter finals for the fourth tournament running.
The impact player of the tournament, John Vaili, scored the match-winning try two minutes into stoppage time as the Manu 7s avenged their loss to the All Blacks Sevens a day earlier in pool play, where they had let a 17-0 lead slip away.
Sir Gordon Tietjens' side also led 12-0 five minutes into their quarter final match-up against South Africa only to conceded three unanswered tries.