Mushfiqur Rahim struck his eighth Test century and became the first Bangladeshi to pass 5,000 runs as the hosts all out for 465 against Sri Lanka on Wednesday. Sri Lanka trailed by 29 runs as they finished the fourth day with 39 for 2.
The visitors' pace bowlers made quick inroads in the post-lunch session in Chittagong but Mushfiqur held one end firm to stay 104 not out.
That gave Bangladesh a first-innings lead of 39 runs on day four of the first Test.
Kasun Rajitha dismissed Liton Das and Tamim Iqbal off the first two balls after lunch before Asitha Fernando removed Shakib Al Hasan for 26 to halt Bangladesh's progress.
The hosts were hoping for some quick runs before a possible declaration after Liton and Mushfiqur remained unscathed in the opening session of the day to share 165 runs for the third wicket.
But Liton fell for 88 right after the break chasing a Rajitha ball wide outside the off-stump only to manage an edge to wicketkeeper Niroshan Dickwella.
Tamim, who retired after scoring 133 runs on the third day, returned after Liton’s dismissal but survived just one ball.
Rajitha, who was playing as concussion substitute for Vishwa Fernando, swung the ball sharply in to uproot the middle stump as Tamim ended his fine, 218-ball innings that featured 15 boundaries.
Shakib gave a catch at forward short leg on seven off Ramesh Mendis which fell just short of the fielder.
He hit three quick boundaries to show some intent and just when he started looking dangerous, Fernando struck.
The right-arm pace bowler beat Shakib with a short ball which took a top-edge and became Dickwella’s fourth catch in the innings.
Mushfiqur glanced Fernando for his fourth boundary, bringing his hundred off 120 balls.
The 35-year old right-hander earlier in the morning session became the first Bangladesh batsman to pass 5,000 Test runs.
He needed 15 runs to reach the milestone when starting the day's play on 53, but was frustrated for half an hour as play was delayed by a wet outfield before Bangladesh resumed on 318-3.
Mushfiqur reached the mark when he nudged Fernando towards fine-leg for two runs, to cheers from a sparse crowd at the Zahur Ahmed Chowdhury Stadium.