In the process, Bangladesh managed a 129-run first innings lead. The Lankans later cut down the lead to 75 runs with all wickets intact.
Sri Lanka opening batsmen Upul Tharanga was unbeaten on 25 while Dimuth Karunaratne was not out on 25.
Earlier, Bangladesh batted brilliantly to take the lead. Overnight batsmen Shakib al Hasan and Test captain Mushfiqur Rahim started the day with positive intent and frustrated the Lankan bowlers in the first hour. Mushfiq played some delightful drives in his innings and reached his well-constructed half-century off 66 balls.
However, Mushfiq got out in the 82nd over, just after Sri Lanka took the second new ball. Mushfiq formed a crucial 96-run partnership for the sixth wicket alongside Shakib. Mushfiq hit half a dozen boundaries during his 52-run knock.
At the other end, Shakib played a calm and composed innings after his risky cameo last Thursday afternoon. The left-hander batted with great composure and added 131 valuable runs for the seventh wicket with debutant Mosaddek Hossain.
Shakib bagged his fifth Test century in the 111th over after sweeping Dilruwan Perera to the leg-side boundary. Shakib though was extremely lucky as the Lankan fielders failed to run him out on 40.
Shakib’s brilliant innings came to an end in the 114th over when he charged down the ground against Lakshan Sandakan and got caught at mid-on. His superb 116-run knock came from 159 balls with 10 boundaries.
Mosaddek also played a sensible innings at No 8 in his very first innings in the longest format of the game. Mosaddek made 75 off 155 balls with seven boundaries and two over-boundaries.
No 9 Mehedi Hasan Miraz scored 24 runs to ensure Bangladesh's 129-run lead.
Rangana Herath and Sandakan bagged four wickets each.
338 & 54/0 in 13 overs (Tharanga 25, Karunaratne 25) trail Bangladesh
467 in 134.1 overs (Shakib 116, Mosaddek 75) by 75 runs