COLOMBO, Sri Lanka (AP) — Kusal Mendis and Dimuth Karunaratne battled to save Sri Lanka from an innings defeat, both scoring half-centuries and sharing an unbroken 111-run partnership on the third day of the second test against India on Saturday.

At tea on day three Sri Lanka following on had scored 118 for one still 321 runs needing to make India bat again with more than two days remaining in the test match.

Mendis was unbeaten on 61, for his fifth test half-century facing 68 deliveries and hitting 12 boundaries. Karunaratne was batting on 55 not out, his 13th half-century, facing 97 balls and hitting seven boundaries.

The pair has added the biggest partnership for Sri Lanka in this series so far.

Sri Lanka was earlier dismissed to 183 in its first innings in reply to India's 622 for nine declared.

They looked to be heading to another collapse when Umesh Yadav struck early; bowling out Upul Tharanga (2) with a delivery nipping back into the left-hander when Sri Lanka had scored just seven.

The hosts resumed the third day on 50 for two in their first innings but lost their remaining eight wickets for 133 runs as off spinner Ravichandran Ashwin bagged his 26th five-wicket haul in test cricket.

He 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 Hardik 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.

Niroshan 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.