India were 213 for four at stumps on the third day, leading Australia by 126 runs in their second innings. Pujara was 79 not out while Rahane was unbeaten on 40.
The day started with Australia resuming their first innings on 237 with four wickets left. The visitors hopes of securing a big lead quickly evaporated as left-arm spinner Ravindra Jadeja took six wickets in the innings to restrict the total to 276 runs. India had been dismissed in the first innings for 189 runs.
Off-spinner Nathan Lyon, who had grabbed a career-best haul of 8-50 in the first innings, went wicketless today.
It was Australian seamer Josh Hazlewood who claimed three of the four Indian wickets.
“It feels pretty level at the moment. They fought back really well in that last session,” Hazlewood told reporters.
“Credit to the two guys out there. They stuck to their plans and scratched away for quite a bit of amount of runs,” Hazlewood said.
Hazlewood’s most important scalp was that of Indian captain Virat Kohli who was adjudged leg before wicket for 15 runs.
India's troubles began when opener Rahul fell to left-arm spinner O'Keefe after hitting his third Test fifty.
Rahul, who top-scored with 90 in India's first innings, put on 45 with Pujara after Abhinav Mukund was bowled by Hazlewood early in the lunch session.
Earlier, left-arm spinner Ravindra Jadeja claimed six wickets to dismiss Australia for 276 in their first innings, a lead of 87. Australia resumed their innings on 237 for six.
Australia lead the four-match series 1-0 after humbling the hosts in the first match in Pune.