India were staring at defeat against England on Tuesday after paceman James Anderson claimed three wickets to leave the hosts struggling at 144 for six at lunch in the opening Test in Chennai.
Chasing a daunting 420, skipper Virat Kohli, on 45, and Ravichandran Ashwin, on two, were batting as the clash neared its climax on the final day.
India resumed on 39-1 but lost their top runmakers after overnight batsman Cheteshwar Pujara fell for 15 off left-arm spinner Jack Leach.
Up and coming Shubman Gill completed his third Test fifty in just his fourth game before Anderson turned on the heat with his reverse swing on a wearing pitch.
Skipper Joe Root gave Anderson the ball in the 14th over and he bowled Gill with an in-coming delivery to send the off stump flying. Three balls later he cleaned up Ajinkya Rahane for nought.
Kohli hit three successive boundaries off Bess and along with Ashwin, who took a nasty hit on his right wrist off a rising Jofra Archer delivery, carried the team to the break without further damage.