The mood of the match was transformed, and the events of the morning seemed to belong to a distant past, although they had ensured India were probably still in the ascendancy.
Those events had occurred at great speed, the openers scoring their runs at 4.75 per over, with Dhawan going at close to a run a ball, capitalising on the smallest sign of width from the quicks and using his feet superbly against spin.
Rahul made his seventh successive 50-plus score in Test matches, becoming the joint record-holder alongside Everton Weekes, Andy Flower, Shivnarine Chanderpaul, Kumar Sangakkara and Chris Rogers. As was the case with most of the previous six innings, he looked good for a century before getting himself out, against the run of play.
Batting was expected to be at its easiest on the first day, with the pitch looking dry beneath an even but not extravagant cover of grass. Kohli chose to bat again, and Sri Lanka made life easy for his batsmen by failing to make use of the new ball.
Fernando, pushing close to 90mph and getting some swing, began reasonably well, finding Dhawan's outside edge in his second over, the ball not quite carrying as third slip dived in front of second. Lahiru Kumara, however, leaked runs, pitching persistently short, feeding Dhawan's cut and Rahul's pull.
Kumara went out of the attack after bowling just three overs and conceding 26. In his place came Dimuth Karunaratne, who, having dismissed Pujara in Colombo, now began to trouble Rahul with his wobble and lack of pace. He beat his outside edge once, then clipped it - once again the ball didn't carry to the slip cordon - and then caused an attempted flick to balloon high over mid-on. Kumara, running back and watching the ball over his shoulder, got his hand to the ball on the dive, but couldn't hold on.
That chance, in the 12th over, would be the last of the session. Leading the spin attack in Rangana Herath's absence, Perera wasn't allowed to settle, Dhawan dancing down the track in only his second over to loft him over mid-off. Rattled, the offspinner dropped short a couple of balls later and Dhawan pulled him for another four.
A return to the attack with a slightly older ball made no difference to Kumara's fortunes - he went too full, rather than too short, in his first over back, and both Rahul and Dhawan drove him for fours. By the 20th over, both batsmen had brought up their fifties.
India ended the first session on a dominant note - Rahul cutting and driving Perera for two fours in the last over before lunch - and continued in that vein after the break, with both batsmen finding the cover boundary off Fernando with drives on the up against good-length balls. Then, Dhawan brought out the sweep that had served him so well in Galle, hitting Sandakan square and fine.
Aside from a top-edged cut from Rahul off Sandakan, which flew to the left of Angelo Mathews at slip, there was little sign of a wicket arriving, but the belated introduction of Pushpakumara provoked a mistake from Rahul, a mistake that would have far-reaching consequences.