Sri Lanka declared on 493 for 7, after batting for 15 minutes on the third morning. The decision came when Ramesh Mendis was caught in the deep off Taskin Ahmed, to give him his fourth wicket.
Niroshan Dickwella was unbeaten on 77, having struck eight fours and a six. Mendis, who made 33 off 68 balls, and Dickwella added 111 runs for the seventh wicket, a partnership that took them to a score more to their liking after Bangladesh took five wickets in the first two sessions on the second day.
Apart from Taskin's four wickets, there was one wicket each for debutant Shoriful Islam, Mehidy Hasan Miraz and Taijul Islam.
On the first two days, Sri Lanka batted through with contrasting levels of confidence.
They raced to 291 for 1 on the first day, with openers Dimuth Karunaratne and Lahiru Thirimanne adding 209 for the opening stand. Both went on to make centuries, with Thirimanne reaching 140 and Karunaratne 118.
Bangladesh hit back on the second morning with three quick strikes, before removing Oshada Fernando and Pathum Nissanka after lunch. Fernando made 81 and later Dickwella and Mendis batted out the final phase at a higher run-rate than the rest of the day.
On a pitch that has given suggestion of uneven bounce and a bit of turn and movement, Bangladesh now have to bat themselves to safety over the next three days, with a push for a win looking unlikely. Sri Lanka, with two spinners in the line-up, have that prerogative.
Source: ESPNcricinfo