Spinners Dilruwan Perera and Rangana Herath each struck twice as Sri Lanka pushed Bangladesh to the corner in the first Test in Galle on Saturday.
The hosts came within five wickets of a crushing victory in the weather-hit Test match at the Galle International Stadium after reducing Bangladesh to 157-5 at lunch on the fifth day.
Skipper Mushfiqur Rahim (34 not out) and Liton Das (32 not out) and shared 53 runs in the unbroken sixth wicket to keep Bangladesh's faint hopes of salvaging a draw alive in the match.
Resuming on 67-0 and needing 390 runs more for victory in the final day, Bangladesh collapsed spectacularly as they lost unbeaten overnight batsman Soumya Sarkar in the second ball of the morning.
Soumya got a leading edge off the first ball. It somehow missed a fielder. However, the next ball of medium pace Asela Gunaratne clipped the bails of his off stump to dismiss the left-hander with his overnight score of 53.
Perera then struck in successive overs, trapping Mominul Haque leg-before for five before forcing a catch from Tamim Iqbal to Gunaratne at slip for 19.
Herath delivered further blows when he removed Shakib Al Hasan for eight and handed Mahmudullah a second-ball duck in a space of three balls in one over.
Shakib gloved a catch to Dimuth Karunaratne at leg slip while Mahmudullah was deceived by an arm ball, which hit his back foot, to be adjudged lbw.
Bangladesh were all out for 312 runs in their first innings replying to 494 runs of Sri Lanka, who later declared their second innings on 274-6.