In the process, the Lankans extended their lead to 139 runs over Bangladesh. Dilruwan Perera was unbeaten on 26 while Suranga Lakmal was not out on 16.
Despite the fall of regular wickets throughout the day, Sri Lanka's overnight batsman Dimuth Karunaratne held the innings together and smashed his fifth Test century with 10 boundaries and a six.
Shakib al Hasan and Mustafizur Rahman took three wickets each while Mehedi Hasan Miraz and Taijul Islam picked up one apiece.
Earlier, Sri Lanka started the day on 54 without loss. And Miraz provided a dream start for the Tigers when he bowled opening batsman Upul Tharanga with a superb off-spinning delivery in the very first ball of the second over. It pitched on middle and leg, spun sharply to beat the outside edge of the batsman and took out off-stump.
No 3 Kusal Mendis steadied the ship alongside Karunaratne and formed an 86-run partnership for the second wicket.
But after lunch, Mustafizur was brought back to the attack and he repaid captain Mushfiqur Rahim's faith by taking three wickets in his seven-over spell.
Mustafizur took the important wicket of Mendis in the last ball of the 45th over. Sri Lanka took a review against the decision but TV umpire Marais Erasmus upheld the on-field umpire’s decision.
Later, Mustafizur also bagged the scalp of Dinesh Chandimal and Dhananjaya de Silva, thus giving Bangladesh the edge over the home side.
Meanwhile, wicket-keeper Mushfiq grasped a brilliant catch, that of Niroshan Dickwella, off the bowling of Shakib in the 60th over. Dickwella tried to sweep Shakib only to manage an edge as Mushfiq took the catch sliding towards the leg side with a brilliant reflex. This is Mushfiq's 100th catch as wicket-keeper.
Perera then played a patient knock to keep Bangladesh at bay.
Bangladesh will be desperate to take the remaining two wickets early in the first session on day five in order to restrict the Lankans to under 150.
338 & 268/8 in 100 overs (Karunaratne 126, Mustafizur 3/52) lead Bangladesh
467 by 139 runs