India were suddenly on top after toiling for 2 1/2 sessions as South Africa threw away wickets at the end of Day 1 of the second test on Saturday.
Hashim Amla's run out on 82 started the late slide as South Africa went from the comfort of 246-3 to 269-6 in the last 10 overs before stumps.
Vernon Philander also ran himself out for 0. In between those two dismissals, Quinton de Kock was out first ball off-spinner Ravichandran Ashwin.
Ashwin was India's best bowler with 3-90 but the Indian seam attack struggled for most of the day on a surprisingly slow pitch at SuperSport Park.
Opener Aiden Markram made 94 at the top of the order as South Africa put together partnerships of 85, 63 and 51 for the first three wickets to control most of the day.
That meant little, though, after Hardik Pandya swooped, turned and threw down the stumps at the non-striker's end to run out Amla and turn the day around.
Two balls later, de Kock edged Ashwin to India captain Virat Kohli at slips, with Kohli setting off on a vigorous celebration that took him right to the other end of the pitch.
Philander's run out next over was the most careless as he set off for a run as the ball looped into the air and dropped between three Indian fielders. South Africa captain Faf du Plessis was unmoved at the other end.
Du Plessis held his team together until stumps and was 24 not out. Keshav Maharaj was with him on 10 not out.
With Markram going well, South Africa was 78-0 at lunch and 182-2 at tea after du Plessis won the toss and said it was an easy decision to bat first at Centurion.
SuperSport Park was expected to be fast and bouncy and replicate the Cape Town pitch where India's batsmen struggled and the top-ranked test team lost by 72 runs to fall behind in a series against its closest challenger in the test rankings. The surface at SuperSport Park was nothing like that, however.
Markram hit 15 fours but fell just short of a century on his home ground and where he grew up watching cricket, getting a thin edge behind to wicketkeeper Parthiv Patel off Ashwin.
Markram has two test centuries and two half-centuries in his first five tests and has been out in the 90s twice now in his first seven test innings.
Ashwin picked up opener Dean Elgar for 31 for the first breakthrough. AB de Villiers was out for 20, played on to seamer Ishant Sharma.
But Markram and then Amla played South Africa into a position of dominance, with Amla stroking 14 fours and appearing to be on the way to another century at a ground where he has his best record. He has four centuries and a double-century at Centurion and was on course to add to that when du Plessis called him through for a quick single and Pandya pounced brilliantly.
India made three changes to its lineup for Centurion after falling behind in the series against its closest challenger at the top of the test rankings. Those changes included surprisingly dropping seamer Bhuvneshwar Kumar, who was one of India's best players in the first test. India brought in Sharma for Kumar and also opening batsman KL Rahul for Shikhar Dhawan, and Patel for injured wicketkeeper Wriddhiman Saha.
South Africa gave a test debut to fast bowler Lungi Ngidi, who replaced injured quick Dale Steyn.