Shreyas Iyer produced a counter-attacking 92 to put India in position of strength on a track that is offering extensive help to spinners as the hosts scored 252 after Sri Lankan bowlers made early inroads on the opening day of the second Test, here on Saturday.
India were struggling at 126 for five at one stage but Rishabh Pant (39 off 26 balls) turned it around with his aggressive yet effective batting.
The left-hander was dropped when he was on four and he made the Lankans pay heavily for the mistake.
Iyer then changed the narrative with his controlled aggression, the result of which was a gritty knock under pressure that will enable India to call the shots in the day/night game.
Iyer made batting look easy after sharp turn and uneven bounce at the M Chinnaswamy track made the Indians dance to Lankan spinners' tunes.
His entertaining knock that came off 98-balls had 10 fours and four sixes, negated all the good work done by the visiting bowlers in the first session when they had taken four wickets, including that of skipper Rohit Sharma (15) and Virat Kohli (23).
He missed out on his second Test hundred as he was stumped off Praveen Jayawickrama (3/81) going for a big shot.
The bowler who had grabbed the momentum for Sri Lanka was left-arm spinner Lasith Embuldeniya (3/94), who also dismissed three batters but was later taken to cleaners by Iyer.
While Iyer and Pant took the counter-attacking route, Hanuma Vihari (31) and Kohli were carefully crafting their knocks during first session.
With the sun shining bright, the pink ball did not swing enough to trouble the batters but a few balls kept really low, making it tough for home team after it elected to bat.
While Mayank Agarwal (4) was run out, Rohit was dismissed by left-arm spinner Lasith Embuldeniya, who got the ball to turn and bounce.
Vihari's eventful stay was ended by Praveen Jayawickrama, also a left-arm spinner, while Virat Kohli's carefully crafted short knock met its end with a ball that kept really low and had him plumb off off-spinner Dhananjaya de Silva.
India could have lost another wicket but Pant was dropped by Suranga Lakmal in the deep when he was on 4.
Vihari and Kohli confidently played drives and cuts to raise a 47-run stand for the third wicket but once it was broken, batting seemed to be a challenge.
The track at M Chinnaswamy stadium was devoid of any grass, India expectedly opted to bat even as Rohit, who looked fluent, and Agarwal also could not utilise the opportunity to score big.
Pacer Lakmal maintained a probing off-stump line but left-arm pacer Vishwa Fernando largely kept it on middle and leg, from where Rohit easily played on-drives. Agarwal, who dispatched one over-pitched from Lakmal to cover region boundary to start off, threw away his wicket when he got himself run out in the second over of the day.
Fernando appealed for a leg before but the umpire was unmoved. Agarwal looked for a single but Rohit also took a couple of steps but stopped realising that there was no run on offer.
But it was too late for Agarwal to get back to his crease since he was already half-way down and was run-out.
Left-armer Fernando dug one short and the Indian skipper dispatched that with ease into the spectators stand with his trademark pull shot.
Left-arm spinner Lasith Embuldeniya created a chance in his very first over when he induced an edge from Vihari but it just fell short of first slip.
However, he scalped the Indian captain, getting him caught in the second slip. The ball had turn and bounce as it took the edge and flew towards de Silva, who completed the catch at gully.
Vihari survived when umpire judged him leg before off Jayawickrama but the DRS review showed that the ball was missing the leg stump. He was 31. However the same bowler had him caught behind soon.
Kohli, who is chasing a long overdue Test hundred, grew in confidence but low-bounce did not allow him stretch his stay.