Opener Shikhar Dhawan and skipper Virat Kohli strike fluent centuries as India take lead of 192 runs.
Indian spinners then dismiss Sri Lanka openers to leave hosts struggling at 5 for 2 in second innings.
Centuries by opener Shikhar Dhawan and skipper Virat Kohli earned India a handy first innings lead before their spinners dismissed both the Sri Lankan openers to put the tourists on top of the first Test, at Galle, on Thursday.
Resuming the second day on 128-2, India were all out for 375 in the final session to claim a first innings lead of 192 runs.
Sri Lanka's troubles did not end there.
Openers Dimuth Karunaratne and Kaushal Silva were both dismissed in the first two overs, leaving the hosts reeling at 5 for 2 in their second innings at stumps, still trailing India by 187.
Earlier, Dhawan (134) and Kohli (103) frustrated the Sri Lankan bowlers with a 227-run stand that was the cornerstone of the Indian innings.
Bowled out for 183 in the first innings, Sri Lanka had a few half chances in the morning session but otherwise failed to trouble the batsmen on the slow pitch at the Galle International Stadium.
The hosts made a stronger comeback in the later sessions, riding on off-spinner Tharindu Kaushal's second five-wicket haul and three wickets from paceman Nuwan Pradeep.
Left-handed Dhawan, who scored 173 against Bangladesh in India's last Test in June, hit a cover drive for four off paceman Dhammika Prasad to complete his fourth Test century.
The 29-year-old, who was dropped on 28 and 122 during his knock, hit 13 fours in his patient 271-ball innings before he chopped paceman Nuwan Pradeep onto the stumps.
Kohli, in his first full series as India's Test captain, hit 11 fours to complete his 11th hundred in Tests but was out shortly after going past the three-figure mark.
The 26-year-old fell leg before after fluffing his sweep shot against off-spinner Tharindu Kaushal, who also dismissed Ajinkya Rahane lbw for a duck in his next over.
Pradeep brought the hosts the fourth wicket of the second session by castling Ravichandran Ashwin (seven), an over after he dismissed the well-set Dhawan.
Wicketkeeper Wriddhiman Saha (60) stretched India's lead with his maiden half-century before he became Pradeep's third victim.
Kaushal also dismissed Harbhajan Singh and Amit Mishra and took his fifth wicket with the dismissal of number 11 batsman Varun Aaron.
Dhawan, Kohli hit tons as India take firm grip on Galle Test
Galle Test: Ashwin grabs six as India take control on Day I
'Indian spinners didn't give any pace to us; bowled really slowly'
PHOTOS: How Ashwin foxed the Sri Lankans in Galle
Rain looms as Kohli's Team India eye series win in Sri Lanka after 22 years