An unbeaten half-century from Ricky Ponting - his 57th in Test cricket - kept Australia in with a chance of winning the second and final Test against South Africa in Johannesburg.
The tourists will begin the final day on 142 for three after they were set 310 runs and with Ponting not out on 54, will need a further 168 runs to claim a series-levelling victory.
South Africa lost seven wickets for 110 as they were bowled out for 339 in their final innings and Australia completed a fine day's work as Ponting and Usman Khawaja (65) added 122 for the third wicket as Khawaja registered his maiden Test half-century.
Vernon Philander struck twice to remove openers Phillip Hughes (11) and Shane Watson (0) and reduce Australia to 19 for two before Ponting and Khawaja came together.
Khawaja stroked eight fours and one six in 110 balls before he was caught by Jacques Kallis off Imran Tahir shortly before the players were taken off the field in fading light.
Michael Clarke was unbeatne on one alongside his former captain Ponting, who had faced 104 balls and hit six fours.
Earlier in the day, Hashim Amla completed a 14th Test century as he and AB de Villiers (72) extended their fourth-wicket partnership to 147 before Australia began their fightback.
Patrick Cummins led their charge, the 18-year-old debutant returning figures of six for 79 as he added the scalps of de Villiers, Philander (23), Dale Steyn (41) and Morne Morkel (0) to those of Jacques Rudolph and Kallis that he picked up on the third day.
Amla fell when he was caught by Brad Haddin off Mitchell Johnson while Ashwell Prince was run out by Ponting for two and Mark Boucher was caught by Watson off Nathan Lyon for 13.
South Africa lost four wickets for 29 runs as de Villiers, Prince, Amla and Boucher fell but some lusty hitting from Steyn, who hit two fours and three sixes, supported Philander, who made 23 to push South Africa's lead past 300 and set Australia a challenging target.
The two early strikes put South Africa back in control but if any have written off Ponting as an international cricketer, South Africa's bowlers certainly won't have and his wicket will be key if the home side, leading the series 1-0, are to fight back once again.
© Cricket World 2011
Open an account with bet365 today and qualify for up to £200 in free bets with our fantastic 100% Deposit Bonus.