A stunning collapse of 10-50 in the final session on Sunday at Newlands resigned Australia to a 322-run defeat on another dramatic day in Cape Town.
Retiring quick Morne Morkel picked up 5-23 in the evening session to record career-best match figures of 9-110 as Australia were skittled for 107 inside 40 overs.
The Proteas now lead the series 2-1 with one Test remaining. But for the first time in a long time, losing a Test match is not the biggest issue facing the tourists.
Australia will be without Steve Smith for the fourth Test after he was suspended for one match by International Cricket Council boss David Richardson for his involvement in the ball tampering scandal that took place on day three.
As the players took the field on Sunday, it was revealed Smith and David Warner had stood down from their respective leadership roles for the remainder of the match, with wicketkeeper Tim Paine installed as interim captain.
Cameron Bancroft, the player who was tasked by Australia’s senior players to use a foreign item to alter the condition of the ball, was fined 75 per cent of his match fee and handed three demerit points.
While the players slept overnight, Cricket Australia chief executive James Sutherland addressed the media outside CA headquarters in Melbourne to explain action will be taken against the players involved in due course and that a full investigation has been launched led by Head of Integrity Iain Roy.
At Newlands, Australia were set 430 to win after South Africa progressed their overnight total from 5-238 to 373 all out midway through the day thanks to half centuries from Quinton de Kock (65), AB de Villiers (63) and Vernon Philander (52no).
Amid the turmoil there was a solitary, and significant, moment to celebrate for the Australians when Nathan Lyon had Kagiso Rabada stumped to claim his 300th Test wicket.
Lyon is just the sixth Australian to reach the milestone and the second spinner behind Shane Warne, and was given a healthy ovation from the patriotic crowd when he raised the ball aloft to acknowledge the landmark.
The off-spinner (3-102), Pat Cummins (3-67) and Josh Hazlewood (3-69) each picked up three wickets as South Africa left Australia needing to break the world record for the highest successful run chase to win or bat out 141 overs to draw the match.
Boos and heckles welcomed Bancroft and Warner to the crease as the mammoth pursuit began, and despite the drama, the opening pair played confidently, calmly and chipped off 47 runs before the tea interval.
However, the dam wall broke in the final session when Bancroft was run out courtesy of a direct hit by Faf du Plessis, who swooped on a punch from Warner at cover and bent back middle stump.
From there it was a procession.
Warner fell three overs later, out to Rabada for the fourth time in the series when de Villiers took a sharp chance at a strategically stationed fourth slip.
Security guards held back vocal spectators as Smith strode down the player race and out to the middle, with a chorus of boos from those not in ear shot of the world’s No.1 batsman.
The following over, Usman Khawaja edged left-arm spinner Keshav Maharaj to de Villiers at first slip before No.5 Shaun Marsh was out the very next ball, brilliantly caught by Aiden Markram at short-leg.
Shaun’s younger brother Mitch survived the hat-trick ball, but the intensity did not relent with Smith at the crease.
Batting like a man who had not slept and had the shadow of not only his own country but the entire cricketing world looming over him, Smith was there physically but mentally he was nowhere to be seen.
His stay ended after 29 minutes, caught by Dean Elgar in the gully from the bowling of Morkel, who replicated the steepling bounce in the first innings to dislodge Australia’s second-drop.
Morkel claimed the next three wickets; Mitch Marsh when he somehow toed a pull shot to de Villiers at third slip, Cummins first ball after the DRS confirmed the quick’s searing bouncer took the wristband of the batsman’s glove, and Starc, who was bounced out after he was worryingly struck in the helmet.
Lyon was run out for a diamond duck and Hazlewood became Morkel’s fifth wicket and ninth for the match when his uppercut was well caught by Vernon Philander at fine third man.
All told, it was South Africa’s second-largest victory in terms of runs over Australia, missing out on equaling the mark that was set in 1970 by just one run.
With a 2-1 lead and one Test to play, South Africa cannot lose the trophy they won in Australia in 2016, but will be determined to become the first Proteas side to beat Australia on home soil since international readmission.
Australia XI: David Warner, Cameron Bancroft, Usman Khawaja, Steve Smith (c), Shaun Marsh, Mitchell Marsh, Tim Paine (wk), Pat Cummins, Mitchell Starc, Nathan Lyon, Josh Hazlewood #SAvAUS— cricket.com.au (@CricketAus) March 22, 2018
South Africa XI: Dean Elgar, Aiden Markram, Hashim Amla, AB de Villiers, Faf du Plessis (c), Temba Bavuma, Quinton de Kock (wk), Vernon Philander, Keshav Maharaj, Kagiso Rabada, Morne Morkel #SAvAUS— cricket.com.au (@CricketAus) March 22, 2018
Qantas tour of South Africa
South Africa squad: Faf du Plessis (c), Hashim Amla, Temba Bavuma, Theunis de Bruyn, Dean Elgar, Heinrich Klaasen, Quinton de Kock, Keshav Maharaj, Aiden Markram, Morne Morkel, Chris Morris, Wiaan Mulder, Lungi Ngidi, Duanne Olivier, Vernon Philander, Kagiso Rabada, AB de Villiers.
Australia squad: Steve Smith, David Warner, Cameron Bancroft, Pat Cummins, Peter Handscomb, Josh Hazlewood, Jon Holland, Usman Khawaja, Nathan Lyon, Mitchell Marsh, Shaun Marsh, Tim Paine, Jhye Richardson, Chadd Sayers, Mitchell Starc.
Warm-up match: Australia beat South Africa A by five wickets. Report, highlights
First Test Australia won by 118 runs. Scorecard
Second Test South Africa won by six wickets. Scorecard
Third Test South Africa won by 322 runs. Scorecard
Fourth Test Wanderers, Johannesburg, March 30-April 3. Live coverage