India, shot out for 201 in the first innings on a dusty, dry wicket, hit back to skittle the Proteas for 184 on the second day at the I.S. Bindra stadium.
The hosts went to stumps on 125 for two in their second knock to take an overall lead of 142 runs with eight wickets in hand in conditions that are tailor-made for the bowlers.
Murali Vijay followed his top-score of 75 in the first innings with 47, sharing a second wicket partnership of 86 with Cheteshwar Pujara, who remained unbeaten on 63 with six fours and a six.
The pair came together after left-handed Shikhar Dhawan bagged a pair, edging Vernon Philander to the slip cordon for the second time in the match without scoring.
Vijay fell to a brilliant one-handed catch at short-leg by substitute fielder Temba Bavuma off Imran Tahir, but Indian captain Virat Kohli kept Pujara company at stumps on 11.
Vijay and Pujara defied the South African attack that missed pace spearhead Dale Steyn, who did not take the field in the second innings due to a “tight right groin”, according to Cricket South Africa.
It was unclear if Steyn will take the field on Saturday as India attempt to build a match-winning lead on a treacherous pitch that has already seen 22 wickets fall on the first two days.
Ashwin proved almost unplayable as he finished with five for 51, reaching the 150-wicket mark in his 29th Test with the dismissal of last man Imran Tahir.
All 10 South African wickets fell to Indian spinners with left-armer Ravindra Jadeja taking three for 55 and leg-break bowler Amit Mishra taking two for 35.
AB de Villiers (63) and skipper Hashim Amla (43) were the only visiting batsmen to offer resistance after Dean Elgar’s 37 as the rest failed to reach double figures.
De Villiers was lucky to cross seven after television umpire Vineet Kulkarni ruled that Jadeja had bowled a no-ball when the batsman was caught in the slips by Kohli.
South Africa, who started the day at 28-2, lost three wickets in the morning session — all of them to Ashwin — to go to lunch on 127-5.
Elgar and Amla put on 76 for the third wicket to take the score to 85-2 before the last eight wickets crashed for 99 runs.
Elgar, whose part-time left-arm spin had bagged four wickets on the first day, made 37 when he top-edged an attempted pull shot off Ashwin to Jadeja at point.
Amla appeared to be finding form after a lean patch in the one-day series before Ashwin had him stumped as the batsman stepped out of the crease to smother the spin and missed the line of the ball.
Four balls later, Jadeja took a fine running catch at backward point to get rid of Dane Vilas and reduce the Proteas to 107-5.
Jadeja and Mishra shared the next four wickets, including the vital one of de Villiers, who was bowled by the leg-spinner to be ninth out.