Colombo - Sri Lankan captain Angelo Mathews hit a century before India fought back to assume control of the second Test at the P. Sara Oval in Colombo on Saturday.
The tourists, seeking a series-levelling win after losing the first Test in Galle, ended Sri Lanka's first innings at 306 after tea on the third day in reply to their own 393.
India closed the day at 70-1 in their second knock, an overall lead of 157 runs with nine wickets in hand on the slow, wearing pitch that promises to help spinners on the last two days.
Murali Vijay was unbeaten on 39 and Ajinkya Rahane was on 28, the pair having put on 67 runs for the second wicket after Lokesh Rahul was bowled by Dhammika Prasad off the fifth ball.
The duo saw off the last five overs in fading light as play was extended by more than an hour due to a rain interruption after lunch.
Mathews hit a glorious 102 to lift his team to a strong position before India turned the tables after a barren morning session.
Sri Lanka, who started the day at 140-3, were cruising at 241-3 soon after lunch when India hit back to take the last seven wickets for 65 runs.
The collapse started soon after Mathews notched up his sixth Test century with a reverse-hit boundary against off-spinner Ravichandran Ashwin.
Leg-spinner Amit Mishra finished with four wickets, while seamer Ishant Sharma and Ashwin claimed two each.
Mathews and his overnight partner Lahiru Thirimanne batted through the morning session to put on 127 for the fourth wicket before Sharma claimed two wickets in the space of three overs after the break.
Sharma had left-handed Thirimanne caught behind by Wriddhiman Saha for 62 and then dismissed first Test hero Dinesh Chandimal for 11, caught at second slip by Rahul.
All-rounder Stuart Binny, who was added to the touring squad before this match, claimed his first success after going wicketless in three previous Tests when he forced Mathews to edge a catch to the slips.
Mishra struck in the next over by having Dhammika Prasad caught in the slips to make Sri Lanka 289-7.
Mathews, one of modern cricket's leading all-rounders, followed his fine spell of two for 24 in 15 overs of steady medium-pace bowling during India's innings with a century that was studded with 12 boundaries.
Sri Lanka, who went to tea at 298-7, lost their last three wickets for the addition of eight runs, with Mishra taking two of those wickets.