Spinners Rangana Herath and Dilruwan Perera shared six wickets between them to help Sri Lanka take command of the first Test against a struggling Bangladesh on a rain-hit day three in Galle on Thursday.
The visitors, replying to Sri Lanka's first innings total of 494, were all out for 312 on the third day, trailing the hosts by a massive 182 runs.
Herath took the final wicket just two balls into the last session before rain stopped play, finishing on 3-72. Off-break bowler Perera chipped in with 3-53.
Bangladesh skipper Mushfiqur Rahim made a dogged half-century and shared 106 runs for the seventh wicket with Mehedi Hasan, ensuring the visitors avoided the follow-on.
Herath bowled his Bangladesh counterpart Mushfiqur on the stroke of the tea break for 85 after the latter took their score past the 300 mark.
Perera broke Mushfiqur's stubborn partnership with Mehedi when he trapped the young all-rounder plumb leg-before for 41 runs.
Perera took the wicket of Taskin Ahmed off the next ball with a successful review after his appeal for lbw 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.