Skipper Mushfiqur Rahim scored a dogged half-century but Bangladesh faced a huge first innings deficit in the first Test against Sri Lanka in Galle on Thursday.
Bangladesh, replying to Sri Lanka's first innings total of 494, reached 312-9 at tea on the third day, still trailing the hosts by 182 runs with their last wicket pair at the crease.
Sri Lankan skipper Rangana Herath bowled his Bangladesh counterpart Mushfiqur on the stroke of the break for 85 after the latter took their score past the 300 mark.
Mushfiqur, who hit eight fours and a six in his 161-ball innings, shared 106 runs with Mehedi Hasan for the seventh wicket to help his side avoid the follow-on before spinners struck back for the hosts.
Off-spinner Dilruwan Perera broke their stubborn partnership when he trapped Mehedi plumb leg-before for 41 runs.
Perera took the wicket of Taskin Ahmed off the next ball after a successful review after his initial appeal for leg-before was turned down by umpire Marais Erasmus.
Mushfiqur and Mehedi's efforts came after Bangladesh lost four wickets in the opening session that had threatened to derail their innings completely.
Fast bowler Suranga Lakmal took the key wicket of opening batsman Soumya Sarkar for 71 after Bangladesh resumed the day on 133 for two.
Bangladesh lost their first wicket when overnight batsman Sarkar top-edged Lakmal's rising delivery to Lahiru Kumara at fine leg.
Soumya added just five runs to his overnight 66, his 137-ball knock containing eight fours and a six.
Shakib Al Hasan contributed 23 rapid runs off 19 balls before flicking a sliding delivery from Sandakan down the leg side where wicketkeeper Niroshan Dickwella completed the catch.
Mahmudullah (8) and wicketkeeper-batsman Liton Das (5) also threw their wickets away with loose shots.