Mustafizur Rahman and Shakib Al Hasan shared five wickets to trigger a collapse in the Sri Lankan innings as Bangladesh pushed the hosts to the brink in the second Test in Colombo on Saturday.
Opener Dimuth Karunaratne held one end to score an unbeaten 110 but Sri Lanka lost wickets in tandem to reach 199-6 by tea on the fourth day with their lead over the visitors now just 70 runs.
Mustafizur helped Bangladesh bounce back in the contest with quick strikes in his second spell of the day after Sri Lanka put 137-1 at lunch break, resuming the play at 54-0.
After the break, the fast bowler ended Karunaratne and Kusal Mendis' 86-run second-wicket stand in the second over as Mendis edged an angular ball outside the off-stump to wicketkeeper Mushfiqur Rahim for 36.
Five overs later it was the turn of first-innings centurion Dinesh Chandimal, who played a loose drive to be caught behind for five.
Asela Gunaratne was adjudged leg-before for seven off Shakib without offering any shot before Mustafizur struck again to hand Dhananjaya de Silva a duck as captain Mushfiqur claimed his third catch of the session.
Niroshan Dickwella survived a close call for lbw but could not make use of it giving Mushfiqur his fourth catch down the leg off Shakib to depart for five.
An edge off Mustafizur flew to third man boundary to earn Karunaratne his fifth Test century after he resumed the play with overnight 25.
Dilruwan Perera was accompanying him at the crease.
Bangladesh struck just in the second over of the day when off-spinner Mehedi Hasan spun one sharply to bowl out Upul Tharanga for 26.
But Karunaratne and Mendis kept them on the bay until Mustafizur broke their resilience.