India were handed their first Test series defeat in three years as debutant Lungi Ngidi's six wickets helped South Africa complete a comprehensive 135-run win in Centurion.
The tourists, chasing 287, lost their remaining seven wickets in the morning session on the final day of the second Test as they were beaten in a series for the first time since their 2014-15 tour of Australia.
Ngidi took the last two wickets to end with figures of 6-39 on his home ground as India were dismissed for 151 and saw their run of nine consecutive series wins end.
Chetesh Pujara became the first India player to be run out twice in the same Test when his desperate dive after attempting a third run came up short and he was sent on his way after a video replay.
Parthiv Patel was then ousted by an impressive catch from Morne Morkel running round to fine leg before Ngidi added to Tuesday's scalps of Lokesh Rahul and Virat Kohli by having both Hardik Pandya and Ravichandran Ashwin caught behind.
Rohit Sharma and Mohammed Shami put up some resistance, adding the only 50-partnership of the innings, but the former fell three runs short of a half-century when AB de Villiers took a superb diving catch at fine leg.
Shami followed for 28 when Morkel held on at mid-on to complete Ngidi's five-wicket haul and the 21-year-old wrapped up the series with a Test to spare when Vernon Philander took a catch at mid-off.