Sri Lanka kept a Bangladesh fightback in check with three quick-fire wickets at the end of day two in the second Test in Colombo after Dinesh Chandimal had scored a century for the hosts.
Bangladesh ended the day 214-5, 124 runs behind Sri Lanka's first-innings 338 all out, but they may rue a missed opportunity, having advanced to 192 for the loss of just two wickets.
Imrul Kayes (34) and Taijul Islam (0) fell in consecutive deliveries, however, although Lakshan Sandakan's (3-65) hat-trick ball was belted for a boundary by Shakib Al Hasan.
However, Sabbir Rahman (42) perished in the next over to Suranga Lakmal (1-32) as the tourists failed to stem the bleeding with Shakib also dropped and nearly chopping on in the final two overs of the day as Bangladesh's gung-ho approach cost them.
They had earlier made a positive start through Tamim Iqbal (49) and Soumya Sarkar (61), who combined for 95 runs until Rangana Herath (1-34) called for a review and Tamim was given out lbw the delivery before tea.
Soumya passed 50 for the third time in a row before falling to a Sandakan delivery that went the other way and Imrul, battling a toe injury, battled through 78 balls before his wicket prompted the late collapse.
Chandimal resumed the day on 86, and took little time to bring up his eighth Test hundred, although Herath (25) had already perished and Sri Lanka were all out when Chandimal was caught for 138 off the bowling of Mehedi Hasan (3-90).
Sri Lanka lead the two-Test series 1-0.