COLOMBO, Sri Lanka (AP) — Kusal Mendis hit a fighting century and shared 191 runs with opener Dimuth Karunaratne as Sri Lanka battled to escape innings defeat against India in the second cricket test on Saturday.

Sri Lanka was forced to follow on with a 439-run first innings deficit after India bowled them out for 183 in its first innings. However they ended the third day well on 209 for two but still needing 230 runs to make India bat again.

Mendis was out for 110, his third test hundred a few overs before close of play caught by wicketkeeper Wriddhiman Saha off seamer Hardik Pandya. He faced 135 deliveries and hit 17 boundaries.

Karunaratne was unbeaten on 92 batting with night watchman Malinda Pushpakumara on two. Karunaratne faced 200 deliveries and hit 12 boundaries in his watchful innings.

India declared its first innings on 622 for nine.

India reaped early success when fast bowler Umesh Yadav bowled out opener Upul Tharanga (2) with a ball nipping back into the left-hander with the team on seven runs.

However both Mendis and Karunaratne made Indian bowlers to toil specially Mendia scoring bulk of his runs with the sweep shot.

Niroshan Dickwella who scored Sri Lanka's only half-century in the first test said his team came out with a different mindset in the second innings after a long meeting at lunch interval.

He said they had plans to use more of the sweep and reverse sweep shots as scoring options.

Ravichandran Ashwin who bagged his 26th five-wicket haul in the first innings went wicketless having bowled 24 overs.

Ashwin said that Indian bowlers were not faulty in the second innings but credited Sri Lanka's batsmen for good batting.

"We beat the bat pretty often even in the sessions we didn't get the wickets. I thought they batted really well."

"I don't think we did too much wrong, we tried all, reverse swing, we bowled cutters. It (the pitch) is slowing down at a very very quick pace, the edges are not carrying. That means we have to stick our guns out and get a few wickets."

The hosts resumed the third day on 50 for two in their first innings but lost their remaining eight wickets for 133.

Ashwin finished with five for 69 while fellow spinner Ravindra Jadeja and fast bowler Mohammed Shami took two wickets each.

Jadeja broke through first in the day having Dinesh Chandimal (10) caught by Pandya. Chandimal's overnight partner Mendis attempted to force Yadav over the infield only to be caught by Indian skipper Virat Kohli.

Ashwin forced Angelo Mathews (26) for a close-in catch to Chetenshwar Pujara and Jadeja bowled out Dhananjaya de Silva.

Dickwella played an aggressive innings in a bid to break free from pressure. But Shami bowled him out for a 48-ball 51.

A win here will seal the three-match series for India after their 304-run win in the first test.