South Africa were eyeing victory after Dale Steyn picked a career-best 7-51 to trigger a dramatic India collapse on the third day of the first Test.
The right-arm quick bowler polished off the last six India wickets for 12 runs in 7.4 overs after tea to bundle them out for 233 and help the visitors enforce the follow-on at the Vidarbha Cricket Association stadium in the Indian city of Nagpur on Monday.
Following on, India were tottering at 66-2, trailing South Africa by 259 runs on the first innings with eight wickets in hand.
Murali Vijay was batting on 27 with Sachin Tendulkar on 15 when stumps were drawn for the day.
Steyn struck again in India's second innings, sending back Virender Sehwag for 16 while Morne Morkel pegged back the off-stump of the other opener, Gautam Gambhir.
||South Africa first innings 558-6 declared (J Kallis 173, H Amla 253 not out, AB de Villiers 53)
||India first innings 233 (V Sehwag 109, S Badrinath 56, D Steyn 7-51)
||India second innings 66-2
In the first innings, India's slide began with the dismissal of skipper Mahendra Singh Dhoni in the first over after tea.
Subramaniam Badrinath's resistance in his first Test appearance was cut short in the next over when he chipped Steyn straight to short mid-wicket.
His 56-run innings came off 139 balls and included seven fours.
The other debutant, Wriddhiman Saha was out off the first ball he faced from Steyn. Zaheer Khan and Amit Mishra played on to their stumps before Harbhajan Singh was trapped lbw, giving Steyn his 13th
five-wicket haul in 37 Tests.
The only positive for India was the 109-run knock by Sehwag who hit 15 fours and also shared 136 runs for the fourth wicket with Badrinath after India were reeling at 56-3.
But Sehwag was dismissed shortly after reaching his 18th Test century when he sliced a quite wide delivery from paceman Wayne Parnell (1-31) to cover where Jean-Paul Duminy took a well-judged catch.
Replying to South Africa's first innings 558-6 declared, India were off to a disastrous start, losing their three top-order wickets inside the first hour.
Steyn got rid of Tendulkar (seven) and Vijay (four) after Morkel (1-58) had dismissed Gambhir (12) to reduce the hosts to 119-3 at lunch.
Gambhir, coming into the series with eight centuries in his last 11 Tests, was out off the first ball he faced when he was caught by wicketkeeper Mark Boucher after poking at an away-going delivery.
The second and final Test between the world's top two teams begins in Kolkata on February 14.
South Africa can snatch back the number one Test ranking from India if they win the series while the hosts need just a draw to remain on top.