India bowled out South Africa for 275 despite a battling half-century by ailing tailender Keshav Maharaj in the second Test on Saturday.
Maharaj, who hit a career-best 72 with an injured shoulder, and Vernon Philander, unbeaten on 44, put on 109 for the ninth wicket to frustrate the Indian bowlers in Pune.
Ravichandran Ashwin broke the stand by taking number 10 Maharaj in the final overs and then claimed the last man Kagiso Rabada, for two, to wrap up the innings with figures of 4-69.
India, who scored 601-5 declared, have until the start of play on Sunday to decide whether to enforce the follow-on. South Africa still trail India by 326 runs.
The Proteas, who resumed on 36-3, slipped to 162-8 after skipper Faf du Plessis fell for 64 to Ashwin's off-spin.
Maharaj, who injured his shoulder while fielding on Friday and went off the pitch for scans, came out to join Philander to make a last stand.
Maharaj passed his previous Test best of 45 with a boundary off Ashwin and completed his fifty to an ovation from the crowd.
Philander, a pace-bowling all-rounder, also played a patient innings. He stayed on for 192 balls before running out of partners.
Fast bowler Mohammed Shami struck early to remove nightwatchman Anrich Nortje for three when he edged a delivery to Virat Kohli at fourth slip.
Theunis de Bruyn was caught behind off Yadav for 30 as the tourists slipped to 53 for five.
Wicketkeeper-batsman Quinton de Kock put on a 75-run fourth-wicket stand with du Plessis to offer some resistance before Ashwin's off-spin bowled him for 31.
Kohli hit a career-best 254 not out to surpass Don Bradman's Test tally of 6,996 runs on Friday as India tightened the screws on the tourists.
A victory for India, already one up in the three Tests, will see them beat the record of 10 straight home series wins they share with Australia.