South Africa are one day away from levelling the series after bowling Australia out for 99 and leaving them 156-4 in their follow-on at stumps on day four at St George’s Park in Gqeberha.
Australia, who trailed by 326 after South Africa’s 425-9 declared, were asked to follow on by Proteas captain Temba Bavuma.
They still need 170 more to make the hosts bat again, with Steve Smith’s neck injury potentially keeping him from batting.
Marco Jansen was the destroyer in the first innings with 5-33.
Resuming on 69-6, Australia lost their last four wickets for 15 runs. Jansen had Beau Webster caught at second slip for 13 to complete his five-for, while Wiaan Mulder, 2-12, bowled a battling Smith for 28, and Kagiso Rabada, 2-33, and injured Anrich Nortje, 1-5, chipped in.
Rabada struck early again in the second innings, removing Nic Maddinson for eight.
Travis Head, dropped on four in the first innings, fought back unbeaten on 87, sharing a 92-run stand with Marnus Labuschagne.
Labuschagne made 39 but threw it away charging Simon Harmer and skying to long-on.
Late strikes from Rabada, who bowled Matt Renshaw for 11, and Harmer, who trapped Beau Webster lbw for either, left Australia 150-4.
Night watchman Scott Boland on two will resume with Head.