Perth - Hashim Amla fell just short of a third Test double century as South Africa built a massive lead on the third day of the third and final Test against Australia at the WACA on Sunday.
The Proteas tightened their grip on the top ranking in Test cricket as they cruised to 467 for five at tea, with an overall lead of 529 runs, five wickets in hand and more than two days to play.
AB de Villiers was on 116 and Faf du Plessis on two, with South Africa needing to win or draw the match to retain the No 1 Test ranking.
For Australia to win and usurp South Africa at the top of the rankings, they will need to set a new record for the highest fourth innings run chase in Test cricket.
The previous mark of 418 was set by the West Indies against Australia at St John's in 2003.
Amla led the way for the Proteas and looked certain to notch a double century, but on 196 he fell to a superb reflex caught-and-bowled from Mitchell Johnson (3-77).
The right-hander had a lucky escape on 108, when Mike Hussey dropped a tough chance in gully off Johnson, but he was in total command for most of his innings, his dismissal ending a 152-run partnership with De Villiers for the fourth wicket.
It was Amla's 18th Test century and he faced 221 balls, hitting 21 boundaries.
After resuming at 99 not out on the third day, Amla took just three balls to reach triple figures, having faced a mere 87 balls.
At one stage, retiring Australian batsman Ricky Ponting was even given a bowl as Amla and De Villiers took the game away from the Australians.
De Villiers reached his 14th Test century in memorable fashion just before tea, audaciously reverse-sweeping spinner Nathan Lyon for three successive boundaries to reach the milestone.
South African Dean Elgar completed a nightmare Test debut, being trapped lbw by Johnson for a four-ball duck to complete a pair for the match.