(BBC) An unbeaten 75 from debutant Moises Henriques averted a fourth-day defeat for Australia, who closed just 40 ahead of India at 232-9 in the first Test.
The tourists looked set to lose by an innings after slumping to 170-8, 17 runs short of making India bat again.
But Henriques, who made 68 in the first innings, hit eight boundaries and put on 57 with last man Nathan Lyon (8).
India had resumed on 515-8 and Mahendra Dhoni added 18 to his overnight 206 before his team were all out for 572.
Dhoni eclipsed Sachin Tendulkar’s record for the highest score by an Indian Test captain, stepping down the wicket to thump Lyon ruthlessly over long-on for six.
But he fell eight runs short of Andy Flower’s landmark as the highest scoring wicketkeeper in an innings when he gloved a James Pattinson bouncer in the sixth over of the morning, the Australian paceman securing his third five-wicket haul in only his eighth Test.
Debutant Bhuvneshwar Kumar kept the Australians in the field for an additional eight overs as he and Ishant Sharma added 26 more for the last wicket.
Australia promoted Shane Watson to open with Ed Cowan after David Warner was deemed too ill, and they were confronted with spin from both ends on a rapidly crumbling surface.
With the final ball of the morning session Ravichandran Ashwin found some sharp turn and bounce as Watson pushed forward and the ball took the shoulder of the bat to give an easy catch to slip.
There was only one boundary in 12 overs after lunch before Australia then lost wickets in consecutive overs to spinners Ashwin and Ravi Jadeja.
Michael Clarke took the attack to Ashwin early in his innings, coming down the pitch to loft over mid-on for six and pulling a short ball next up for four but he lost Warner, who was lbw pushing forward to Harbhajan Singh for 23.
In his 100th Test, Harbhajan also added the wicket of Matthew Wade who missed an attempted sweep and was bowled, before Ashwin claimed the key wicket of Clarke for 31 with the third ball after tea.
The captain attempted to cut but the ball spun sharply in and pinned him lbw in front of off-stump.
Peter Siddle was another to succumb bowled attempting a sweep, before Ashwin left Australia on the brink with wickets in consecutive overs, the spinner taking his tally of Test victims to 75.
But the powerfully-built Henriques played in correct, circumspect fashion, occasionally breaking the shackles with a boundary, such as the six he hit over long-on to record his second successive fifty, when he stepped down the pitch to Harbhajan.
Henriques added another six down the ground off Ashwin but India will remain confident of completing victory on the final day in Chennai and taking an early lead in the four-match series.