The stunning turnaround under the Duckworth/Lewis method meant South Africa maintained their unbeaten record in pink and make it 3-1 in the six-match series.
Heinrich Klaasen smashed 43 not out off 27 balls (5 fours, 1 six) and led the Proteas' assault on the Indian spinners after rain intervened twice to reduce the game to a 28-over contest.
Lightning and light rain had first intervened during the Indian innings, and it came again early during the South African innings. 113 minutes were lost and South Africa received a 202-run target from 28 overs.
After the rain delay, the Proteas needed 159 more off 124 overs, effectively turning this into a T20 game. It didn't help that Bhuvneshwar Kumar (0-27) and Jasprit Bumrah (1-21) had already bowled 4 overs each by then.
More From This Section
Amla was joined by JP Duminy (10), but they could only manage to add 24 runs for the 2nd wicket. AB de Villiers (26 off 18 balls) arrived at the crease as the roof came down at the Wanderers and made his intentions clear as he smacked Yuzvendra Chahal (1-68) for two sixes over midwicket.
Suddenly South Africa were reduced to 102/4 with the wrist spinners in action. Then, came the turning point of the game as Chahal bowled David Miller, only for the ball to be deemed a no ball.
Miller made full use of his lives as he went on to smack Pandya for three successive boundaries in an over and also hit Chahal for a six. Overall, he scored 39 off 28 balls, with 4 fours and 2 sixes.
Runs came thick and fast as the spinners thanks to a true batting pitch and dewy conditions due to rain were unable to contain the Proteas for once, going for 119 runs in 11.3 overs.
Andile Phehlukwayo smacked 23* off only 5 balls, including 1 four and 3 sixes, taking South Africa home with 15 balls to spare.
Dhawan put on 158 runs with skipper Virat Kohli (75). It was the 8th century partnership for the 2nd wicket between these two batsmen, the most in ODIs Indian cricket, drawing level with Sourav Ganguly and Rahul Dravid who also have eight.
Dhawan also became the first Indian batsman to score a hundred in his 100th ODI. Overall, he became the 9th player to reach this milestone.
This was after India won the toss and opted to bat on a true batting surface. The visitors made one change, bringing in Shreyas Iyer for Kedar Jadhav. South Africa made two changes, bringing in Morne Morkel for Imran Tahir.
A change in scenery though didn't reverse Rohit Sharma's floundering fortunes on this tour. He was out cheaply again, this time for 5 runs off 13 balls, as Kagiso Rabada (2-58) took a brilliant reflex return catch diving forward.
Dhawan and Kohli then came together, replicating their success from previous matches in the series. Together they attacked the South African attack, finding the pitch much to their liking.
In doing so, Kohli became the second batsman after de Villiers to score 350-plus runs in an ODI bilateral series on South African soil.
Thunder and lightning then forced players off the field, and there was a brief rain shower as well.
That break served South Africa well as India lost two wickets in the space of 14 balls after resumption of play.
Shreyas Iyer (18) was sent out at no.5 and together with MS Dhoni (42 not out) he calmed the situation for India.