South Africa captain Graeme Smith's international cricket career came to an abrupt end on Tuesday when he was dismissed for 3 as Australia moved ever closer to victory on day four of the third test at Newlands.
South Africa, set 511 to win, was 71-4 at stumps after Mitchell Johnson dismissed Smith to bring the 33-year-old's involvement in the match at Newlands to a close shortly before tea.
Smith announced his retirement from international cricket late Monday, and received a guard of honour from the Australians when he made his way to the crease.
However, his stay there was shortlived, as old foe Johnson had him caught by short leg in the fourth over of the innings.
Only a small crowd turned out to witness the final day of Smith's 12-year career, but they gave him a standing ovation as he left his home ground.
South Africa found itself in major trouble soon after when Dean Elgar was bowled by Johnson to leave it on 15-3 at tea, but Hashim Amla and AB de Villiers batted for more than 30 overs to ensure the game went into a fifth day.
Amla was bowled by James Pattinson for 41 with 30 minutes remaining, but De Villiers went to stumps after facing 100 deliveries for just 16.
Earlier, David Warner recorded back-to-back centuries in the same match to set up Australia's declaration on 303-5.
Having already scored a quick 135 in the first innings, Warner smashed 145 at almost a run a ball as Australia scored at more than five runs per over in its second innings, allowing captain Michael Clarke to declare with a day and a half remaining in the game.
Kyle Abbott was the only South African to enjoy any real success as he dismissed Warner on the way to figures of 3-61.
Although Dale Steyn returned to the South Africa attack for the first time since incurring a hamstring strain on day one, he bowled just three overs that were hit for 24 runs.
Australia resumed on its overnight total of 27 without loss, and its attacking intent was clear as openers Warner and Chris Rogers added 93 at better than a run a ball until Rogers was run out for 39 by Steyn's direct hit.
Warner became more subdued when Alex Doolan came to the crease, and Australia scored at less than three runs per over for the remainder of the session, but he opened up again after the lunch break to go to three figures in 124 balls.
After Morne Morkel dismissed Doolan for 37, Shane Watson scored a brisk 25 before falling to Abbott, who followed up by having Clarke caught for a first-ball duck.
Steve Smith smashed 36 not out from 20 deliveries before Clarke called his batsmen in to leave South Africa with a record target, and bring its long-serving captain to the crease for the final time.
Smith lost opening partner Alviro Petersen quickly as he was trapped lbw by Ryan Harris for 9, and in the next over Smith's career was brought to a close by a Johnson lifter. Smith also started his test career with 3 against Australia on his same home ground.
Johnson went on to bowl Elgar for a 13-ball duck on the stroke of tea, and leave South Africa needing a miracle to avoid defeat in Smith's final match.
Amla and De Villiers provided some hope of holding out for the draw, but the hosts face a long final day.