Graeme Smith’s final Test innings ended in failure as South Africa headed for a series defeat against Australia in Cape Town.
Smith made just three runs before falling to Mitchell Johnson for the fourth time in the three-Test series.
His side were chasing 511, after David Warner followed his first-innings 135 with 145 in the second as Australia piled up 303-5 in 58 overs before declaring.
The Proteas ended the day 70-4, which represented a good recovery after a terrible start.
Smith got off the mark with three from his second ball, but saw opening partner Alviro Petersen fall lbw to Ryan Harris for nine. Worse was to follow as Smith edged Johnson off his hip to Alex Doolan at short leg.
He was warmly saluted by the crowd and kissed the badge on his helmet before raising his bat in acknowledgement, but it was a sad farewell.
Johnson then splattered Dean Elgar’s stumps before he had scored to leave the hosts 15-3 at tea.
After the interval, defence was very much the order of the day for Hashim Amla and AB de Villiers, with 21 runs coming from the first 10 overs.
Michael Clarke introduced Steve Smith’s bits-and-pieces leg-spin, but neither a second-ball beauty past De Villiers’s edge nor a succession of unsettling full tosses could produce a breakthrough.
The 50 partnership came up in 163 balls, De Villiers contributing an uncharacteristic 14 from 74, but Amla was dismissed lbw by James Pattinson for 41 after an unsuccessful review.
Nightwatchman Kyle Abbott saw the day out alongside De Villiers, who had faced 100 balls and hit just one boundary in his 16 not out.
n Shahid Afridi rescued Pakistan as they booked a place in the Asia Cup final with a three-wicket win over Bangladesh in Mirpur.
Afridi hit an 18-ball half-century was no less important against the tournament hosts as Pakistan scraped home with a ball to spare. Pakistan will now meet Sri Lanka in Saturday’s final.