Chasing an unlikely target of 457 set by Sri Lanka, Bangladesh reached 67-0 by the end of day four of the first Test against Sri Lanka in Galle on Friday.
The Bangladeshi openers saw off 15 overs as play was stopped early because of bad light with 11 overs remaining.
Soumya Sarkar backed up his first innings half-century with an unbeaten 53 off 47 deliveries with six fours and a six. Tamim Iqbal was 13 not out.
The tourists need a further 390 runs in 98 overs on the final day to record their first Test win over Sri Lanka.
Sri Lanka declared on 274 for six with opener Upul Tharanga hitting a hundred and vice-captain Dinesh Chandimal chipping in with an unbeaten half-century.
It was Tharanga’s third Test century and the second against Bangladesh. He added 69 runs for the first wicket with opener Dimuth Karunaratne, who made 32.
The opener was slow out of the blocks, taking 109 deliveries to complete his half-century, but from 50 to 100, he needed only 55 more deliveries.
It was Tharanga’s first century at home in his 14th game and he added 65 runs for the second wicket with first innings hero Kusal Mendis, who made 19.
Tharanga also added 64 runs for the third wicket in quick time off just 78 deliveries with Chandimal and reached three figures with a single to mid-wicket off Shakib Al Hasan.
Mehedi Hasan bowled Tharanga when he attempted a slog-sweep but failed to connect. His 115 came off 171 deliveries with 11 fours and two sixes.
With clouds gathering, Sri Lanka were expected to declare at tea with a lead of 429, but they batted on after the break and added a further 27 runs.
After tea, Chandimal, who had been dropped on 11 by Soumya Sarkar at slip went on to post his half-century, his first in eight innings.
The declaration finally came when Dilruwan Perera was caught behind by wicketkeeper Liton Das to give Mustafizur Rahman his first wicket in the innings.
Shakib Al Hasan and Mehedi Hasan picked up two wickets apiece.
Bangladesh need to create history to win this Test match. The highest successful run chase ever in Test cricket is 418 when West Indies beat Australia in 2003. No team has successfully chased more than 382 in Sri Lanka.