South Africa trio Faf du Plessis, Dean Elgar, and Morne Morkel did most of the damage to leave Australia staring at a heavy defeat on the penultimate day of the fourth and final test on Monday.
Du Plessis struck his eighth test century and combined in a 170-run stand for the fourth wicket with Elgar, who made 81, as the home team declared on 344-6 in the second innings to set Australia a near-impossible victory target of 612 at the Wanderers.
When bad light ended play early, Australia was reeling at 88-3 and 524 runs behind. Paceman Morkel trapped openers Matt Renshaw and Joe Burns.
The highest winning fourth-innings score in test cricket was 418-7 by West Indies against Australia in 2003.
South Africa is 2-1 up and on the brink of beating Australia in a home series for the first time since 1970.
Du Plessis hit 120 despite twice being hit on the right index finger, a digit he broke earlier in the season. He struck 18 fours and two sixes in his 178-ball innings.
Opening batsman Elgar was much less expansive as he ground out an ultra-patient 81 off 250 deliveries.
After du Plessis and Elgar were dismissed, Temba Bavuma (35) and Vernon Philander (33) piled on the agony for Australia with an unbeaten partnership of 71 for the seventh wicket.
Paceman Pat Cummins was the most productive bowler, taking 4-58 to finish with a career-best nine wickets in the match.
South Africa batted almost leisurely after starting the day on 134-3, and finally declared at tea. It seemed the home side was giving Morkel, playing his last test before retirement, a chance to recover from a left side strain. Kagiso Rabada was also carrying a lower back strain, and Vernon Philander had his groin strapped.
But all three bowled, and Morkel was the most effective.
His in-swinger trapped Renshaw lbw for 5 with the total on 21.
Usman Khawaja was then out for 7 after opting for a review when a ball from slow left-armer Keshav Maharaj pitched outside off stump. The batsman suggested he played a shot and the Australia No. 3 was unhappy to be sent packing.
Morkel claimed the third lbw of the innings to dismiss Burns for 42.
Peter Handscomb was 23 not out and Shaun Marsh undefeated on 7 at the close.