But Sharma's 17th ODI ton was enough only to get India towards a big total. After looking at India's score, it seemed that he was nearly 50 runs short. Following his wicket, JP Duminy and David Miller followed his footsteps back to the pavilion.
Chahal and Kuldeep shared six wickets between them at St George's Park, where India defended a below-par total in a messy effort in the field that still managed to force a South African collapse.
The last match of the ODI series is on Friday in Pretoria.
Chasing a victory target of 276, South Africa started well, when openers Hashim Amla (71) and Markram (32) added 52 runs for the first wicket. Will the visitors find a breakthrough?
However for South Africa, wicketkeeper-batsman Heinrich Klaasen, who assured it a victory in the rain-curtailed encounter in Johannesburg, had tackled the Indian wrist spinners well. India won their first global title in 1983 in the United Kingdom before adding a second in 2011 on home soil. He scored 115. Shikhar Dhawan made 34, while Virat Kohli scored 36.
He has amassed 318 runs in three matches, having been dismissed just a single time.
Lungi Ngidi was the key bowler for South Africa as he finished his spell with four wickets. After removing Rohit Sharma in the second ball of the 43 over, he removed Hardik Pandya for a golden duck in the very next ball. Even if we make a mistake now, we'll know how to respond to that same situation the next time around. India are in trouble now.
The recent history which has seen India losing against the Proteas in the 50-over format at the South African conditions could change under the flamboyant captaincy of Virat Kohli. How long will his partnership with Shreyas Iyer last? Kohli has hit two centuries and 46 not out to go with his 75 in Johannesburg. This was the only instance where Rohit failed to score a hundred.
Among top run getters in the series, Kohli leads the way as expected with 318 runs and Dhawan comes a far second with 162 in three matches. Rabada was all fired up to have picked Shikhar Dhawan. He had realised the pitch had slowed down, and needed to put the two run-outs behind him to take India past 250.
Aiden Markram won the toss and elected to bowl in the fifth ODI against India on Tuesday.
What the skipper's sensational form has meant is that India's otherwise ordinary batting line-up and flaws in the batting have gone unnoticed. The dramatics didn't subside but India did ensure that they took that number of wins in the series to four and clinch their first ever bilateral series win in South Africa. Recently, Pandey made two successive, unbeaten and match-winning half-centuries in the inter-state T20 tournament - 55 off 54 balls and 92 off 76 - while opening the batting. They lost the 4th ODI match on Pink Day by D/L method.