South African pacer Morne Morkel's three-wicket burst wrecked India and the hosts were reduced to 149 for 6 in their first innings at tea on the opening day, of the third and penultimate Test in Nagpur on 25 November.
Opting to bat on winning the toss, India got off to a good start, when openers Murali Vijay (40) and Shikhar Dhawan (12) put on their second successive half century stand of the series.
But the loss of both the batsmen in the second hour before lunch followed by a dramatic collapse after the break left the hosts, who are leading 1-0 in the series, at a difficult 125 for 6.
In the space of 15 overs after lunch, India lost four wickets for the addition of only 31 runs after being 95 for 2. Morkel and off-spinner Simon Harmer did the most damage.
Wicket-keeper Wriddhiman Saha (9) and Ravindra Jadeja (21) then remained unconquered at the end of the second session, in which the home team lost four wickets for 64 runs.
Jadeja played some attacking shots against the spinners in his 26-ball unbeaten knock that contained four fours, while Saha was giving him watchful support at the other end.
Morkel, lacking effective pace support at the other end in the absence of the injured Dale Steyn, was the most impressive of the bowlers and his tea figures read 3 for 27.
Harmer, mostly bowling from around the wicket, also utilised the spin-friendly track well to have 2 for 65 while Elgar, the other wicket taker, had figures of 1 for 7.
In the morning the home team lost Vijay and Dhawan to adjourn to the interval at 85 for 2.
Dhawan, denied strike for long, was lured out by Elgar soon after the 50 was raised in 13.4 overs and spooned a drive back to the left arm slow bowler who accepted a return catch to his right.
The left hander's 12 came off 23 balls and was his third low score in the series.
South Africa hit back strongly through Morkel in the first hour post lunch as the hosts lost Cheteshwar Pujara (21), captain Virat Kohli (22) and Ajinkya Rahane (13).
Morkel, who got rid of Vijay in the first session, added the wickets of Kohli and Rahane to his kitty in a fiery third spell.