the bowlers. After dismissing Jacques Kallis for his 300th wicket in 89 Tests, Zaheer Khan (1/135) proved expensive on the final day of the match, even as Sharma (1/91) toiled hard.
R Ashwin (0/83), the lone spinner, did not provide any breakthroughs as the fifth day pitch evened out for batting.
South Africa started the last session of the day needing another 127 runs for a historic win. MS Dhoni gave a bowl to Kohli, interchanging the ends for Zaheer and Ishant who he deployed first up.
It was a surprise move since Shami had not bowled since the 88th over of the innings, whilst Zaheer had bled runs since the new ball had been taken in the 80th over.
The 150-run partnership came in the 111th over then, along with the 350-run mark. Two overs later, du Plessis celebrated his third Test hundred.
When his pairing with de Villiers breached the 178-run mark, it became the highest fifth wicket partnership in the fourth innings of a Test match.
The previous best was 177 by B Congdon and V Pollard for New Zealand against England at Nottingham in 1973. 61 runs had come in the first hour after tea and only 66 more runs were needed in the final hour spanning 15 overs.
De Villiers completed his 18th Test hundred in the 121st over and in the next, the 200-run partnership came up. The 400-run mark was up too, with 58 runs to win.
Finally Shami was back in the 123rd over, after an inexplicable gap of 34 overs. It showed immediately as he mad the batsmen skip with awkward bounce on incoming deliveries.
Maybe it helped as de Villiers was bowled in the next over by Ishant, bringing an end to his partnership with du Plessis. At the other end, Shami bowled JP Duminy (5).
It was left to du Plessis to see this through and he nearly did, in the company of Vernon Philander (25 not out, 37 balls, 3 fours). But at the sight of victory, in the 133rd over, du Plessis was run-out via a direct hit from mid-off by Ajinkya Rahane.
With 16 needed off