The marathon stand
The left-right batting combination of Karunaratne and Mendis then dug in their heels to thwart the Indian bowling attack, forcing skipper Virat Kohli to rotate his options. The duo handled the Indian spinners with aplomb, using their feet to good effect as they combined the right dose of caution and aggression.
Mendis, who hit his third Test hundred, played an attacking game as he smashed 17 boundaries before letting go of his hard work with a catch to wicketkeeper Wriddhiman Saha.
The Colombo-born Karunaratne remained patient during his 200-ball knock so far as he played out the remaining few overs with debutant Pushpakumara in a tense finish to the day.
But it was the first session that hit the hosts hard as they lost eight of their remaining wickets and conceded a 439-run lead in response to India's formidable 622 for nine declared.