Sri Lanka skipper Rangana Herath struck in consecutive balls to remove Soumya Sarkar and Imrul Kayes, as Bangladesh's fourth innings chase of 191 got an early blow on Sunday.
With the score on 38 for 2, the Tigers need 153 more runs to seal a win in their 100th Test. The main challenge will be the swing of Herath, playing on his 39th birthday.
Opener Tamim Iqbal is giving his team hope, not out on 22.
Earlier, Suranga Lakmal and Dilruwan Perera showed grit to defy Bangladesh bowlers as Sri Lanka set the Tigers a target of 191.
The duo added 50 runs on Sunday morning, taking their ninth wicket partnership to 80, but a misunderstanding between them saw the stand broken with Perera falling victim to a run out.
In the next over, Lakmal gave a catch to Mosaddek Hossain in his attempt to blast a Shakib Al Hasan delivery.
Perera hit his second half century in as many games, making exactly 50 while Lakmal had added 42.