Bangladesh made early inroads on the third day of the second Test in Dhaka on Wednesday but Sri Lanka recovered to reach lunch at 210-4, still trailing by 155.
Angelo Mathews was on 25 alongside Dhananjaya de Silva, 30, before rain forced an early lunch in Dhaka in reply to Bangladesh's first innings total of 365.
Shakib Al Hasan then produced a gem of a delivery to dismiss Dimuth Karunaratne for 80 soon afterwards, after the Sri Lankan skipper had added 10 to his overnight score.
Shakib tossed the ball up on off-stump and beat Karunaratne who went for a drive but saw the flighted delivery dip and turn between bat and pad and crash into his stumps.
Karunaratne, who was dropped on 37 on the third day, struck nine boundaries in his 15th Test fifty.
De Silva hit Ebadot for three fours in one over just before the break after he and Mathews survived a difficult spell from the right-arm pace bowler and Shakib.