Bangladesh were a session away from forcing a draw in the second and final Test against Sri Lanka in Chittagong after a defiant batting display on the fifth day on Saturday.
The hosts, who needed to bat out their second innings after being set an improbable target of 467, were 204-3 at tea at the Zahur Ahmed Chowdhury stadium.
Mominul Haque was unbeaten on 71 and Shakib Al Hasan was on 13, the pair having added 53 runs for the fourth wicket.
Sri Lanka have one more session to claim the remaining seven wickets and sweep the short series after winning the first Test by an innings and 248 runs in Dhaka.
Bangladesh, who began the day at 12-0, lost two wickets in a tense morning session to go to lunch at 91-2.
Tamim Iqbal and Shamsur Rahman put on 71 for the first wicket, before both openers fell in the space of 10 runs.
Tamim made 31 when he was bowled by leg-spinner Kithuruwan Vithanage, who was bowling for the first time in his short four-Test career.
Rahman, a century-maker in the first innings, looked in fine touch during his knock of 45 when he was bowled by off-spinner Dilruwan Perera.
Imrul Kayes, who also got a hundred in the previous innings, helped Mominul add 70 for the third wicket on either side of lunch before he was leg-before to Perera for 25.
Sri Lanka missed spin spearhead Rangana Herath and seamer Shaminda Eranga, who both flew home before the Test to recuperate from injuries.
Perera was the most impressive bowler for the tourists, conceding just 36 runs in 21 steady overs for his two wickets.