Steve Smith scored his first century in Australia in over three years but India's bowlers sparked another batting collapse for the hosts before their batsmen made a solid start to reach 96-2 by the end of the second day of the third cricket test at the Sydney Cricket Ground.
Smith's 131, his first century since the 2019 Ashes and Australia's first this series, helped lift the hosts to 338 but Australia will be disappointed to have not scored more given their final eight wickets fell for 130 runs with India spinner Ravi Jadeja taking 4-62 and completing a spectacular run out to dismiss Smith and end the innings.
India made a good start to their innings reaching 70 without loss before Australia's pace attack responded by removing both openers in the final session.
At stumps, captain Ajinkya Rahane was unbeaten on five with Cheteshwar Pujara on nine, trailing Australia by 242 runs with eight first-innings wickets remaining.
Having resumed Friday at 166-2, Australia was well-placed to take a stranglehold on the match after they had won the toss and elected to bat.
Marnus Labuschagne made 91 off 196 balls, and shared a century stand with Smith to see Australia past 200 runs for the first time in five innings this series, before he edged the impressive Jadeja to Rahane at slip with Australia at 206-3.
Jadeja then had Matthew Wade (13) playing a poor shot to be caught in the deep, before Jasprit Bumrah (2-66) trapped Cameron Green lbw with the last ball before lunch.
After lunch, captain Tim Paine (1) and Pat Cummins (0) were both bowled cheaply leaving Australia at 278-7.
Smith then reached his 27th hundred in 76 tests with a leg glance for three runs off Navdeep Saini in the 98th over. The former captain was far more effusive in his celebration than usual reflecting the relief at having scored his first century in 15 innings spanning four series.
Smith's eighth 100 against India came in 259 minutes off 201 balls, with 13 boundaries, and was the first against India in a home test since David Warner's quickfire century at the SCG in 2015. It was also Smith's first century in Australia since December 2017 in a drawn test against England at the Melbourne Cricket Ground.
Mitchell Starc scored 24 off 30 balls, including two boundaries and a six, before holing out from debutant Saini (2-65). Nathan Lyon was also out for a duck, trapped by Jadeja to reduce the hosts to 315-9.
Smith's was the last wicket to fall, run out spectacularly by Jadeja with a direct hit from deep square leg, as he was chasing quick runs with Josh Hazelwood.
India opened their innings briskly with second-gamer Gill especially looking comfortable at the crease.
Hazlewood made the breakthrough for the hosts in the 27th over to remove Sharma caught and bowled for 26, leaving India at 70-1.
Gill reached his maiden half century off 100 balls, with eight boundaries, before Cummins found the opener's edge and had Gill caught by Green at gully the next ball.
Pujara and Rahane both survived some near misses in the final overs as Australia bowled a perilous line and length searching for a late wicket to tilt the match in their favour going into the third day.