Ishant Sharma and Jasprit Bumrah sparked a dramatic collapse as India beat South Africa by 63 runs on the fourth day of the third and final Test at the Wanderers Stadium on Saturday.
Dean Elgar and Hashim Amla shared a century second-wicket partnership which took South Africa more than halfway towards their target of 241 before Amla’s dismissal for 52 started a collapse in which nine wickets fell for 53 runs.
Sharma and Bumrah claimed two wickets each to start the slide before Mohammed Shami ripped through the lower order, taking five for 28.
Elgar was left to fight alone, carrying his bat for 86 off 240 balls.
The win ensured India stayed comfortably on top of the International Cricket Council Test rankings despite losing the series 2-1.
South Africa would have drawn level on points if they had completed a clean sweep.
The hosts were looking comfortable as Elgar and Amla compiled a partnership of 119, although it took four hours and 50.4 overs of hard work on a difficult pitch. It was only the third-century partnership of the series.
But India hit back with the wickets of Amla and AB de Villiers in quick succession shortly before tea.
Amla fell with the total on 124 when he clipped Sharma firmly towards midwicket and Hardik Pandya dived to his right to hold a good catch. Amla had faced 140 balls in making his second half-century of the match.
De Villiers started confidently with a boundary off Sharma but was out for six when he was squared up by a lifting delivery from Jasprit Bumrah which flew off the shoulder of his bat to Ajinkya Rahane at gully.
The same two bowlers struck again immediately after tea. South African captain Faf du Plessis was bowled by a ball from Sharma which cut back and kept low and the out-of-form Quinton de Kock was trapped leg before wicket first ball by Bumrah.
Vernon Philander batted brightly to make 10 before he pulled a ball from Shami onto his stumps, to be followed in quick succession by Phehlukwayo, Kagiso Rabada and Morne Morkel, all without scoring.
Phehlukwayo was bowled by Shami, Rabada was caught at first slip by Bhuvneshwar Kumar and Morkel was bowled by Shami.
Elgar, having batted with unflappable concentration for more than five hours, tried to play some shots and keep the strike after being joined by last man Lungi Ngidi. He hit a six off Kumar before Ngidi was caught behind off Shami.
Conditions remained difficult for batting but there were none of the extreme bounces and deviations that prompted the umpires to halt play shortly before the scheduled close on Friday.
But once the Elgar-Amla partnership was broken new batsmen were unable to play with any confidence.