Graeme Smith was out for 3 in his last Test innings as South Africa crashed to 15 for 3 chasing 511 to win on the fourth day of the third and final Test at Newlands on Tuesday.
David Warner hit a dashing 145, his second century of the match, before Australian captain Michael Clarke declared at 303 for five to set the hosts the huge target.
There were a potential 144 overs remaining in the match, leaving South Africa needing to fight an extended rearguard action in order to avoid defeat in South African captain Smith's last Test.
Smith was given a guard of honour by the Australian players but soon lost Alviro Petersen, his opening partner, who was leg before wicket to Ryan Harris - the 100th Test wicket for the fast bowler.
Six balls later Smith fell for the fourth time in the series to Mitchell Johnson, edging a lifting delivery onto his thigh pad, with the ball looping to short leg Alex Doolan for an easy catch.
The Australians stood to salute Smith as he left the ground and his teammates gathered on the pavilion steps to applaud him off. Smith kissed the badge on his helmet and waved to the crowd before disappearing into the dressing room.
Dean Elgar was bowled by Johnson with what proved to be the last ball before tea.
Smith announced on Monday night that he was retiring from international cricket after the current match. His last stint as captain in the field was an ignominious one as at times he had nine fielders on the boundary in a futile effort to stop the flow of runs.
Warner followed up his first innings 135 with another rapid century, made off 124 balls. His last 45 runs were scored off 32 balls before he edged Kyle Abbott to wicketkeeper AB de Villiers going for another big shot. He hit 13 fours and four sixes.
When Warner was on 79 he reached 1000 runs in eight matches during the southern hemisphere season.