South Africa were bowled out for 265 as Australia won the series-deciding third Test by 245 runs at Newlands, leaving their captain Graeme Smith to retire from international cricket with a defeat.
Australia's Ryan Harris took the last two wickets as South Africa came within five overs of saving the third Test on a dramatic day in which a third umpire decision came close to deciding the outcome of the match.
Australia first innings 494
South Africa first innings 287
Australia second innings 303
South Africa second innings
A Petersen lbw b Harris 9
G Smith c Doolan b Johnson 3
D Elgar b Johnson 0
H Amla lbw b Pattinson 41
A de Villiers c Haddin b Harris 43
K Abbott b Pattinson 7
F de Plessis lbw b Smith 47
J Duminy c Lyon b Johnson 43
V Philander not out 51
D Steyn b Harris 1
M Morkel b Harris 0
Total: (all out; 134.3 overs) 265
Fall of wickets: 1-12, 2-12, 3-15, 4-68, 5-95, 6-136, 7-173, 8-246, 9-265, 10-265
The Proteas started the day on 71 for four and batted for 94 overs but could not find an anchor all day, despite a number of candidates emerging.
Philander, Faf du Plessis (47), JP Duminy (43) and AB de Villiers (43) all spent time at the crease, but not long enough to save the Proteas from a first series defeat since Australia won by the same scoreline in the 2008/09 season.
Not even a controversial third umpire decision could derail Australia's victory charge, though they left it late in the day to force the win with Harris the hero.
Vernon Philander was not out on 51 after surviving a controversial moment with 16 overs remaining that left Australia seething when third umpire Richard Illingworth overturned a decision against him.
Mitchell Johnson produced a fierce bouncer that clearly caught the right thumb of the South African, who was given out by on-field umpire Aleem Dar.
Philander reviewed the decision and it was overturned based on the view that the batsman's hand was not on the bat handle.
Replays looked inconclusive and the Australians were seething, leading to an ugly verbal confrontation between touring captain Michael Clarke and Steyn.
The victory gave Australia the series 2-1 and came in the wake of their 5-0 thrashing of England in the home Ashes series played earlier this year.
"I didn't enjoy much of today to be honest, it was a long day and it was getting pretty close at the end," Australia captain Michael Clarke said at the post-match presentation.
"South Africa have always been the hardest challenge for me as an individual player and this series was no different."
Clarke believed his bowling attack, which he described as the best in the world on arrival in South Africa, were the difference.
Smith's last match
"Mitchell Johnson and Ryan Harris have been exceptional, James Pattinson has come in and done a job and Nathan Lyon has been good in the series as well."
The match is the last for South Africa's Smith who announced his retirement from international cricket after day three of the Test having played in 117 five-day games, 109 as skipper.
"The resilience and courage the guys showed today was immense, we were outplayed in the whole Test match so we needed to find something today.
To take it as deep as we did is a huge effort from the boys," Smith said.
"It's also important to congratulate Michael and the Australia team on a series victory, it's always been a pleasure playing against them."