Dinesh Chandimal produced a counter-attacking unbeaten 162 to lead a spirited fightback for Sri Lanka and set India a tricky target of 176 runs to win the first Test at Galle on Friday.
Chandimal staged a remarkable recovery for the hosts as he notched up a career-best knock to help Sri Lanka score 367 in the second innings after they were tottering at a precarious 95 for five at one stage, after conceding a 192-run first innings lead.
Chandimal's effort not only helped the Lankans avoid an innings defeat but gave them enough of a lead to throw the match on a track providing quite a bit of turn for the slow bowlers.
India were 23 for one at stumps on third day, requiring another 153 runs to take a 1-0 lead in the three-match series.
For Scorecard and Commentary, click here .
The visitors lost opener Lokesh Rahul (5), who was trapped LBW by Rangana Herath. Shikhar Dhawan (13) and Ishant Sharma (5) were at the crease at the end of the day's play.
The 25-year-old wicketkeeper batsman found able allies in Lahiru Thirimanne (44) and Jehan Mubarak (49) as they put on valuable partnerships to frustrate the Indians.
The Indians had themselves to blame to allow the hosts to wriggle out of a tight position while some dubious umpiring decisions also went against them on the third day.
It was a commendable fightback from the Sri Lankans, who counter-attacked the Indian spinners and completely destroyed their rhythm.
At lunch time, it looked like India would run away with an easy victory as Sri Lanka were reeling at 108 for five but Chandimal changed the complexion of the game as he clobbered the bowlers to record his fourth Test century.
Chandimal hit 23 boundaries, including four sixes, in his fighting knock and raised a 125-run stand with Thirimanne for the sixth wicket. With Mubarak, he was involved in an 82-run partnership for the seventh wicket.
Off-spinner R Ashwin, who took 6/46 in the first innings, was the pick of the Indian bowlers with 4/114, completing his third 10-wicket haul in a Test. Leg-spinner Amit Mishra took 3/61 while Ishant Sharma, Varun Aaron and Harbhajan Singh accounted for one batsman each.
The day began well for the Indians as they managed to get rid of the overnight batsman, Dhammika Prasad (3), in the very first ball of the day off pacer Varun Aaron.
Retiring great Kumar Sangakkara (40) and captain Angelo Matthews (39) briefly provided some resistance before they were dismissed at the stroke of lunch.
The script took a completely different turn after lunch as Chandimal led a spirited Lankan recovery with some audacious stroke-play.
The day also saw Ajinkya Rahane set a new fielding world record by taking eight catches in a Test match, eclipsing the record of five others.