India's rampaging ODI run was brought to a halt by a resilient South Africa, which kept itself alive in the series with an exhilarating five-wicket win in the rain and lightning-struck fourth one-dayer, here.
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. In total 113 minutes were lost and South Africa received a 202-run target from 28 overs.
Until then, chasing 290 originally, Hashim Amla (33) and Aiden Markram (22) had given an attacking start to the hosts. Markram was out lbw in the eighth over in what turned out to be the last ball before rain came. The hosts were placed at 43/1 at that stage.
After the rain delay, the Proteas needed 159 more off 124 overs, effectively turning this into a T20 game. It didn't help India as Bhuvneshwar Kumar (0-27) and Jasprit Bumrah (1- 21) had already bowled 4 overs each by then.
Amla was joined by JP Duminy (10), but they could only manage to add 24 runs for the second 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.
He looked good for many more, but shockingly holed out out at fine leg off Hardik Pandya (1-37) in the 17th over as the game turned on its head. At the other end, Amla was caught by Bhuvneshwar off Kuldeep Yadav, the fielder taking an acrobatic catch at the boundary rope.
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 delivery to be deemed a no ball.
Miller made full use of the reprieve 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.
But it was Klaasen who proved to be the real difference as he punished the spinners, Chahal in particular. He unleashed a plethora of inventive shots, including the switch hit and chased umpteen wide deliveries, hitting them in an unorthodox manner to garner more boundaries.
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 not out off only 5 balls, including 1 four and 3 sixes, taking South Africa home with 15 balls to spare.
Earlier in his 100th match, Dhawan (109) scored a 13th hundred as India reached 289 for 7 after opting to bat.
Dhawan put on 158 runs with skipper Virat Kohli (75). It was the eighth century partnership for the second 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 ninth player to reach this milestone.
The Wanderers was expectedly bathed in pink for a good cause of creating awareness and raising funds for breast cancer.
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.
Kohli looked unstoppable once again and the highlight of his knock was a straight six off Lungi Ngidi as the batsman just walked down and launched him over the sightscreen.
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.
Markram dismissed Pandya with a one-handed stunning catch at cover off Rabada as India slipped further. India scored only 89 losing 5 wickets after the rain break.