Captain Dimuth Karunaratne and Kusal Mendis were batting on 10 and 16 respectively at the close of play, needing 419 more runs to win the match. India declared their second innings at 303 for 9 during the final session when Axar Patel was out for 9 after India had played 68.5 overs in their second innings.
Mohammed Shami remained not out on 16. Shreyas Iyer top-scored with a 87-ball 67 while star wicketkeeper-batter Rishabh Pant struck a counter-attacking 31-ball 50. Captain Rohit Sharma contributed 46.
For Sri Lanka, Praveen Jayawickrama was the most successful bowler with figures of 4/78 while Lasith Embuldeniya took three wickets. Earlier, in reply to India's first innings total of 252, Sri Lanka were all out for 109 from 35.5 overs with pacer Jasprit Bumrah (5/24) claiming his maiden fifer on Indian soil while Ashwin and Mohammed Shami took two wickets apiece.
Sri Lanka resumed at 86 for six but their innings lasted for just 5.5 overs on Sunday, losing Lasith Embuldeniya (1), Suranga Lakmal (5), Niroshan Dickwella (21) and Vishwa Fernando (8) with the addition of just 23 runs.
India are leading the two-match Test series 1-0 after winning the first game by an innings and 222 runs.
Brief Scores:
India: 252 and 303 for 9 declared in 68.5 overs (Shreyas Iyer 67, Rishabh Pant 50, Rohit Sharma 46; Praveen Jayawickrama 4/78).
Sri Lanka: 109 all out in 35.5 overs (Angelo Mathews 43; Jasprit Bumrah 5/24) and 28 for 1 in 7 overs.
(With PTI inputs)