Taijul Islam and Shakib Al Hasan made things interesting by picking up Dimuth Karunaratne and Dhananjaya de Silva respectively in the first hour of the afternoon session but an assured unbroken 44-run stand between Dinesh Chandimal and Niroshan Dickwella has almost secured a draw for the visitors.
At tea on day four, Sri Lanka were 137 runs ahead with four wickets remaining. There was a slim chance of a Bangladesh win when they picked up six wickets and had some 45 overs remaining in the day but Chandimal and Mathews stuck together for 100 balls and finished the second session unscathed.
Before getting out to Taijul in the second session, Karunaratne brought up his fifty. He was dismissed on 52 off 138 balls. de Silva too played well for his 60-ball-33.
Bangladesh, one bowler short because of Shoriful Islam's injury, were punished by Kusal Mendis earlier in the first session. He showed a lot of intent and added 67 off just 14.4 overs with Dimuth Karunaratne before getting out on an entertaining 48 off 43. He struck eight fours and a maximum.
Sri Lanka slowed down and added just 22 off 12.4 overs after Mendis' fall. At lunch they were 128 for four, leading by 60 runs.
Angelo Mathews was the only other batter dismissed in the morning session.
Taijul, who affected a run out and took the wicket of Lasith Embuldeniya on day four, picked up the wickets of Mathews, Mendis and Karunaratne.