An unbeaten century from Graeme Smith led South Africa to 217-2 at the close of day two of the second Test match with Australia at Adelaide.
After the hosts were dismissed for 550, Smith put on a 138-run opening stand with Alviro Petersen before he finished day two on 111 to leave his side with a deficit of 333 runs.
Australia had closed day one on 482-5 after a double century from Michael Clarke but he could only add six more runs to his overnight score of 224 before he was bowled by Morne Morkel.
The final four wickets quickly followed as Australia finished all out for 550 with Morkel recording 5-146.
Smith and Petersen got South Africa's innings off to the perfect start with a century stand before tea, but that was finally brought to an end when Petersen was run out by Mike Hussey for 54.
Hashim Amla could only add 11 before he was caught by wicketkeeper Matthew Wade off the bowling of David Warner.
That brought Jacques Rudolph to the crease but he played second fiddle to Smith who recorded his 25th Test match hundred to keep his side in contention.