Kolkata - Rangana Herath hit 43 not out to help Sri Lanka build a 91-run first innings lead after losing early wickets against India in the rain-hit opening Test on Sunday.
Sri Lanka were 263-8 at lunch on day four with Herath and Suranga Lakmal, on 10, defying a persistent Indian pace attack led by Mohammed Shami.
The visitors, who started on 165-4 in reply to India's 172, slipped to 201-7 before Herath put on a 43-run eighth-wicket stand with Dilruwan Perera, who made 5 off 34 balls.
Shami claimed three wickets including the two overnight batsmen, Niroshan Dickwella and skipper Dinesh Chandimal, to check Sri Lanka's progress in the morning.
Dickwella, who made 35, and Chandimal (28) had scored briskly to extend their partnership to 62.
The left-handed Dickwella edged a seaming and bouncing delivery from Shami, with skipper Virat Kohli taking a sharp chance at second slip.
Shami got Chandimal, who had added 15 to his overnight 13, caught behind in his next over as the visitors lost three wickets in 10 deliveries.
But the left-handed Herath showed great resolve in an innings which has lasted 67 balls so far and included six boundaries.
Sri Lanka gained the upper hand against their top-ranked hosts thanks to a 99-run third-wicket stand between Angelo Mathews (52) and Lahiru Thirimanne (51) on Saturday.
The visitors are seeking their first-ever Test win on Indian soil in the three-match series.