Colombo - The decisive third and final Test between India and Sri Lanka was on a knife edge after 15 wickets fell during a dramatic third day's play in Colombo on Sunday.
Play ended with India on 21/3 in their second innings, an overall lead of 132 with seven wickets in hand on a seaming pitch at the Sinhalese Sports Club.
With the series locked at 1-1 and bowlers from both sides trying to press home the advantage, a fine rearguard action by Sri Lanka's lower order stood out.
India's makeshift opener Cheteshwar Pujara carried his bat through his side's innings to anchor his team to a competitive 312 before their first innings ended 25 minutes after the start of the day's play.
The hosts slipped to 47-6 in reply and were in danger of being asked to follow on before the last four wickets added 154 runs in a remarkable revival that helped them to 201 soon after tea.
Indian seamer Ishant Sharma picked up five wickets, but Sri Lanka were saved by a defiant 79-run partnership between debutant wicket-keeper Kusal Perera and tailender Rangana Herath.
The pair joined hands with the hosts still 66 away from avoiding the follow-on and with Dhammika Prasad having retired hurt after being hit on the hand by a rising ball from Sharma.
Left-handed Perera, making his Test debut after playing 48 one-day internationals and 20 Twenty20 games, smashed the Indian bowlers for 55 off 56 balls with the help of nine boundaries.
Perera was dismissed by Sharma, top-edging a pull to mid-off, but 37-year-old veteran Herath made 49 and Prasad, who returned to bat after being treated in the dressing room, chipped in with 27.
Ishant Sharma said Perera and Herath had "nothing to lose" when they went after the bowling in a desperate bid to boost the total.
"Talking of Kusal Perera, he had nothing to lose and was just going after the bowling," the lanky seamer said. "As a bowler, one really can't do much except bowl in the right areas.
"He was slogging till the end. What we can do is set a field, set a plan and bowl according to that plan, so that the captain does not look like a fool on the ground."
Sharma said the team had not talked of what would be a good score to defend in the fourth innings.
"To be honest, we have not yet set a score," he said. "The situation is challenging. Hopefully we can get to what we got in the first innings and give them a good target to chase."
Perera said it could be anyone's match on the lively pitch.
"The wicket is quite lively and the match is wide open," he said. "If we can take quick wickets tomorrow there is a good chance we can win this Test. The morning session will be crucial for both teams."
Pujara, who marked his recall to the Indian Test side with an unbeaten 145 in the first innings, was bowled by Dhammika Prasad for a second-ball duck in his second knock.
Seamer Nuwan Pradeep then bowled Lokesh Rahul and trapped Ajinkya Rahane leg-before to leave India on 7-3. Skipper Virat Kohli and Rohit Sharma played out time before heavy rain ended play 35 minutes early.
Pujara had been dropped for India's last four Tests across Australia, Bangladesh and the ongoing series. And he might have missed this match had both regular openers Murali Vijay and Shikhar Dhawan been fit.
The 27-year-old, who usually bats at number three, notched up his seventh Test century and become only the fourth Indian after Sunil Gavaskar, Rahul Dravid and Virender Sehwag to bat through the innings.
Sri Lanka won the opening Test in Galle by 63 runs but India drew level with a 278-run win in the second match at the P. Sara Oval in Colombo on Monday.