Cape Town, South Africa: Ryan Harris condemned South Africa captain Graeme Smith to defeat in his last international as the seamer sealed a 245-run victory for Australia in the dying moments of the third test at Newlands on Wednesday.
Harris bowled Dale Steyn and Morne Morkel in the same over as South Africa, trying to bat out a draw, was bowled out for 265 with 27 deliveries remaining in the game.
Australia clinched the series 2-1, handing South Africa just its second series defeat in its last 26 test series under Smith.
Smith announced his retirement from international cricket on Monday after a 12-year career, and at one stage his team looked set to pull off a stunning rearguard and earn a share of the series.
However, Harris, who will fly home to undergo knee surgery, put in one final push to swing the ball and hit the wickets of Steyn and Morkel and spark wild celebrations for Australia.
Australia declared twice at 494-7 and 303-5, and South Africa replied with 287 and 265. For centuries in both innings, Australia opener Dave Warner was named man of the match, and series.
South Africa's intent to settle for the draw, and not chase a target of 511 to win, was clear from the beginning of the day when it resumed on a parlous 71-4.
Nightwatchman Kyle Abbott and AB de Villiers scored just 24 runs in the first 25 overs of play but, crucially, kept the Australian bowlers at bay as the fielders crowded the bat.
Abbott was finally shifted after a 114-minute vigil when he left a James Pattinson delivery and was bowled, but that was the only wicket to fall before lunch.
Australia took the second new ball after the break though, and struck two vital blows in the second session.
First, Harris found the edge to remove De Villiers after a stay of 5 hours, 26 minutes at the crease that brought 43 runs from 228 deliveries, and then Faf du Plessis was trapped lbw by Steve Smith for 47.
That left Australia needing three wickets to win, but Vernon Philander and JP Duminy saw South Africa to tea, to leave the home side with 33 overs to see out in the final session.
The pair reduced that to 20 before Duminy was caught at leg slip for 43 off the bowling of Johnson, but the drama wasn't over.
Philander continued to fight, and was involved in a moment of controversy when he was given out caught at short leg off Johnson, only for the third umpire to rule that his right hand was off the bat at the time the ball brushed the glove.
The decision drew the ire of Australia captain Michael Clarke, who became entangled in a war of words with Dale Steyn as a drinks break signalled the final hour, or 15 overs.
Philander and Steyn whittled that down to five, seeing off tough spells from Johnson and Pattinson, but then Harris returned to rewrite the final part of Smith's script and give Australia the honours from a memorable test series.