South Africa defended 86 runs off the last ten overs to ensure Quinton de Kock
's first international century of 2015 and fourth in seven innings against India was not in vain. De Kock stood out after the rest of South Africa's line-up was tied down by spin. India dragged them from 205 for 2 to 270 for 7, and then found themselves in a similar position but with less time to bat and more runs to get.
In the 44th over India were 206 for 3 and South Africa's seamers had the hosts' middle order firmly in their grip. Unlike India, who used flight to flummox, South Africa stuck to their short-ball strategy and Morne Morkel
reaped most of the success. He took two of the next three wickets, of Virat Kohli and Ajinkya Rahane, to reduce India to 216 for 6 and silence their challenge.
In energy-sapping heat, de Kock's performance was made even more impressive as he ushered a new opening partner into some form, struggled through the Indian squeeze and cast aside cramps to anchor the South African effort. He had support from Faf du Plessis, whose third half-century in as many matches helped post the highest partnership of the match - 118 runs for the third wicket - to ensure that the late wickets did not stop South Africa from posting a competitive total.
India would have believed they could chase it down and were on track with Kohli and MS Dhoni at the crease but lost momentum as the innings wore on. A shuffling of the batting line-up, which saw Rahane come in at No. 6, meant that India ran out of batsmen when they needed them most.
South Africa's ability to adapt has advanced to altering their own gameplans which they did when they promoted David Miller to open the batting in a bid to assist him through his lean patch. The idea seemed to be to shield Miller from as much spin as possible but it also meant de Kock, who was only recalled to the side at the start of this series, had to operate as the senior partner.
He took charge immediately with the first shot of aggression off his blade; a free-flowing drive which became the hallmark of his innings. While India's seamers adjusted their lengths, de Kock and Miller were able to find the boundary five times in the opening seven overs and forced Dhoni to play his trump card early.
Harbhajan Singh was brought on in the eighth over but the openers had settled well. De Kock brought up South Africa's 50 with back-to-back straight drives and Miller grew in confidence, especially with his footwork. But he fell for 33 as he sliced Harbhajan to backward point where Rahane took a tumbling catch.
Hashim Amla batted out of position at No. 3, struggled to find fluency and was stumped for the second match in a row. De Kock fought through a boundary drought which extended from the 14th over to the 21st and seemed to show even more patience than his senior partner, du Plessis. Again, the waiting game proved worthwhile for du Plessis, whose 50 came off 52 balls. Dhoni used a fourth spinner in Suresh Raina to try and tie South African down further but the visitors still seemed set for a total over 300, especially with de Kock at the crease.
His century came when he charged against Mohit Sharma and smacked a slower ball through the covers to suggest the time had come for acceleration but then India intervened. Du Plessis tried to repeat a scoop shot that had gone over Dhoni's head for four but skied it to a running short third man, de Kock was run-out trying to meet AB de Villiers' demand for stealing a single and the captain was trapped lbw at the start of the 41st over.
India took three wickets for five runs and South Africa had only one recognised pair left. Both JP Duminy and Farhaan Behardien have been in good form, but India's spinners did not let them get too far away.
De Kock spent the first 30 overs of the Indian reply rehydrating and by the time he got back on the field, the advantage was swinging back towards South Africa after India seemed to be cruising. Rohit Sharma and Shikhar Dhawan built a solid start despite both offering chances that South Africa put down off Duminy in the eighth over.
Dhawan succumbed to mounting pressure again when he tried to drive Morkel through the off side but got an edge through to de Villiers, who was keeping in de Kock's place.
Kohli was promoted to No. 3 as India looked to mimic South Africa in giving him enough time to find his way back to form and their move paid off better than South Africa's. Kohli struck his first ODI fifty since the World Cup and batted with an authority which suggested he would see India though.
With Rohit at the other end, India progressed steadily, taking advantage of a South African attack that seemed to be allowing matters to drift. Rohit reached fifty with a massive six off Imran Tahir and India's 100 came up four balls later. Although their going was laboured, it seemed headed in the right direction until Duminy saw Rohit coming, dropped the ball a touch shorter, and completed the catch in his follow through as the batsman coaxed a gentle dab back to him.
Dhoni joined Kohli in the hope of injecting some impetus into the innings. He took on Steyn with some success but was more cautious against Tahir and Kagiso Rabada who managed to tire India down. They conceded 11 runs in five overs from the 32nd over to the 36th, during which Kohli scored fifty, to prompt de Villiers to bring on one of his premier pacers again.
Morkel started to make things uncomfortable for India in his second spell but it was in this third that he caused real damage. He had Dhoni caught at short third man, looking to upper cut a short ball to change the course of the chase. Tahir removed Raina, who racked up a second successive duck, with a googly that he sent to long-off and then Morkel finished India off. In two balls, he had both Kohli and Rahane caught at deep midwicket, playing identical slogs.
India left the tail too much to do with 55 runs required off the last five overs and found themselves chasing the series, yet again.
Firdose Moonda is ESPNcricinfo's South Africa correspondent