Faf du Plessis made 134 while AB de Villiers scored 103 but South Africa still found themselves eight runs short of India\'s 458.
After five days of gruelling battle where the luck fluctuated from one side to another, the first Test between South Africa and India ended in a draw when the home side decided not to go for the required 16 runs in three overs, with still three wickets left.
South Africa could have gone for victory with Vernon Philander (25*) and Dale Steyn (6*) still at the wicket but they decided to play it for a draw, thus ending at 450 for 7, eight runs short of India's target of 458. India, on the other hand, should feel much happier of the two sides as to the most part of the day, it appeared that they would lose the contest, which they would have probably thought they would win when the final day's play began on Sunday.
Faf du Plessis and AB de Villiers once again set a perfect platform for South Africa, stringing 205 for the fifth wicket, but they both got out at crucial moments, leaving their team in a dilemma to whether go for victory or be satisfied with a draw.
Earlier in the day, Alviro Petersen (76), who was unbeaten on 76 overnight, had many problems facing the reverse swing that Mohammed Shami was getting in the morning. He was deceived by a full in-swinging delivery that wrapped onto his pads, flattening him on the pitch. Expecting another full-delivery next up, he was tentative coming forward to a length ball and played on.
Jacques Kallis was out first ball in the first innings and had a very close leg before shout on the first delivery by Shami. But the veteran batsman looked in imperious touch, driving everything through covers with precision.
He raced to 37 with six boundaries and looked set to get to the fifty mark before Zaheer Khan trapped him lbw to a delivery that curled in from round the wicket. But Kallis got a big inside edge on that one and was visibly shocked when Rod Tucker raised his finger.
But Zaheer was never going to complain about the dismissal as that brought him his 300th wicket in Test cricket - the fourth Indian bowler after Kapil Dev, Anil Kumble, Harbhajan Singh to reach the mark. India kept on pressing for another wicket before lunch but Du Plessis and De Villiers denied them any hope. Both were ready to repeat the Adelaide heroics when they batted the entire day in 2012 to claim a draw from the jaws of defeat.
Both the batsmen looked a little more aggressive in their approach after lunch, with Du Plessis getting to his fifty with a pull through deep square leg off Shami. De Villiers struck a string of boundaries to bring up his fifty that also reminded India what he was capable of doing if he would stay at the crease for some more time.
The Indian bowlers could not stick to a tight line, giving the two batsmen enough chance to free their arms or rotate strike, which they seized with both hands. Dhoni continued to put close in fielders which provided the South Africa batsmen opportunities to score runs through vacant third man.
By the time Dhoni decided to keep an in-out field, both Du Plessis and De Villiers were well set as South Africa moved imperiously towards achieving the target. At tea, the match nicely poised, favouring more towards South Africa as they needed another 127 runs with six wickets in hand.
Both Du Plessis and De Villiers came into the last session believing they would win the match and Dhoni's defensive field-setting made it easier for both of them to move slowly towards that target. Du Plessis got to a well-deserved century - his third in Tests - with a couple of runs through midwicket.
Neither Zaheer nor Ashwin troubled the two batsmen but Dhoni still persisted with them well after tea, until he finally decided to replace the former with Shami after the left-armer bowled eight overs on the trot after the break. But by the time Shami was brought on, South Africa needed just 58 more to win.
Shami gave away just two runs in his comeback and that created a chance at the other end. AB de Villiers played-on while trying to glide one to third man. Shami struck with the wicket of JP Duminy (5) in his next over and kept one end tight, while Ishant Sharma too bowled plenty of overs without giving many runs.
South Africa needed just 20 runs in four overs when Dhoni decided to go with the experience of Zaheer. Ajinkya Rahane, fielding at mid-on, struck directly for the second time in the innings and that ended the fabulous innings of Du Plessis. That also ended South Africa's hopes, as by then they had made up their mind to not go for a win.