Virat Kohli and Ajinkya Rahane made unbeaten half-centuries as India battled back against Australia on day two of the second Test, leaving the match in Perth delicately poised. 

A 59-run partnership between Tim Paine (38) and Pat Cummins (19) helped Australia get to 326 before they were bowled out in the first session, with India's response reaching 172-3 by the close of play. 

The tourists had appeared to be in serious trouble after losing opening duo Murali Vijay (0) and KL Rahul (2) in the first six overs of their innings, but Cheteshwar Pujara and Kohli (82 not out) dug in from 8-2 to stop the rot in the second session. 

Nathan Lyon (0-34 from 22 overs) and Cummins (0-40 from 17 overs) combined to give little away in an intense battle with Kohli and Pujara, the two batsmen having to wait more than 21 overs between boundaries before the latter eventually fell for 24 to a great catch from wicketkeeper Paine. 

However, Australia had no answer for an unbroken 90-run stand between the India captain and Rahane, who was on 51 not out at stumps.

The hosts had resumed on 277-6 and after a strong start from Paine and Cummins, the latter was bowled by Umesh Yadav (2-78) and Australia's skipper wasted a review after being trapped leg before by Jasprit Bumrah (2-53). 

Mitchell Starc (6) and Josh Hazlewood (0) edged successive deliveries from Ishant Sharma (4-41) to bring an end to Australia's innings, but they wasted no time in putting India under pressure. 

Starc (2-42) cleaned up Vijay with a full, inswinging delivery to make the breakthrough before lunch and Hazlewood (1-50) dismissed Rahul with a stunning yorker after the break, in the process claiming a second early wicket. 

Kohli sent Hazlewood for three fours in the same over but the boundaries dried up for the tourists during the afternoon. 

Cummins thought he had struck a blow in the absorbing battle by getting Pujara lbw on 23, but ball tracking showed the delivery was going over the top of the stumps. However, there was no doubt when Pujara edged Starc down the leg side and was taken by Paine, leaving India three down. 

Rahane picked up the run-rate immediately, with two fours and a six encouraging Kohli to hammer Cummins over gully and bring up his half-century. 

After back-to-back fours off Hazlewood, Rahane reached 50 with a single off Lyon, his efforts helping put India in a competitive position ahead of what looks to be an intriguing Sunday.