Hashim Amla brought up his 21st Test match hundred in the process of helping South Africa set Australia a daunting target of 448 to win in Port Elizabeth.
The 30-year-old needed to add only seven runs to his overnight total to bring up the landmark as the Proteas pushed towards a declaration on the morning of day four.
He eventually finished unbeaten on 127, with first-innings centurion JP Duminy also contributing a run-a-ball 18 not out before Graeme Smith waved his batsmen in on 270-5.
Debutant Quinton de Kock was the only wicket to fall in the session before lunch as he chipped off to Michael Clarke off the bowling of Nathan Lyon, having made 34 off 58 balls.
Australia's openers David Warner [10] and Chris Rogers [21] survived a tricky eight-over spell to get to the interval unscathed, and in fact showed some intent to chase down an improbable victory as they left the field on 31-0. The tourists are one-nil up in the three-match series having won convincingly in Centurion.