After Sri Lanka made early inroads on a spinner-friendly ground, Shreyas Iyer's pyrotechnics with the bat propelled India to a position of strength, with the second Test decisively tilting in favour of the hosts, here on Saturday.
The early afternoon sun did not allow the pink ball to swing sufficiently to worry the batters, but the early and quick spin on offer made things difficult for the Indians, who were struggling at 126 for five at one point.
With a fierce 36-run knock, Rishabh Pant started the counter-attack, while Iyer continued the recovery job with a magnificent 92-run knock that enabled India record a respectable 252 in their first innings.
Iyer's exciting 98-ball performance, which included 10 fours and four sixes, overshadowed the visitors' good work in the first session, when they took four wickets, including skipper Rohit Sharma (15) and Virat Kohli (23).
Iyer was stumped by left-arm spinner Praveen Jayawickrama (3/81) while attempting for a huge hit, missing out on what would have been a merited second Test century.
Later, in considerably colder floodlit conditions, the pink ball was expected to aid the fast bowlers, and the dangerous India speed pair of Jasprit Bumrah (3/15) and Mohammed Shami (2/18) ripped away the top-order with two wickets each.
As the ball came in to break the stumps, Shami's removal of opponent captain Dimuth Karunaratne (4) was a delight to see.
Sri Lanka finished the day at 86 for six, trailing by 166 runs, after losing 16 wickets on the first day, nine of them to spinners.
Angelo Mathews (43 off 85 balls) and Charith Asalanka (5) put on a 22-run partnership for the fifth wicket, but it was short-lived as Axar Patel dismissed the left-hander.