Mohammad Ashraful was unbeaten on 70 at stumps on day four of the first Test between Bangladesh and Sri Lanka in Mirpur as the hosts kept alive their hopes of saving the match.
Ashraful's eighth Test half-century, and first since he scored 129 not out against the same opponents in July 2007, steered the home side to 254 for five after they were set an unlikely target of 521 to win.
Sri Lankan skipper Mahela Jayawardene struck 166 before declaring the second innings at 405 for six in the morning to put the Bangladesh batsmen under pressure.
The hosts lost wickets whenever they looked liked building a partnership, after Tillakaratne Dilshan ran out Imrul Kayes (13) with a direct hit from midwicket to end an opening stand of 40 runs.
Paceman Dammika Prasad removed opener Tamim Iqbal for a confident 47 before off spinner Muttiah Muralitharan removed Zunaed Siddique (37) and Raqibul Hassan (24), taking his match tally to eight wickets.
That became nine when he had Mehrab Hossain (23) caught by substitute Chamara Kapugedera before Ashraful and Shakib Al Hasan (34) dug in, adding 74 runs for the sixth wicket.
Sri Lanka added 114 runs losing two wickets after resuming on 291 for four in the morning, following Monday's break due to parliamentary elections and a 20-minute delay caused by dampness on the pitch.
Jayawardene, on 129 overnight after scoring his 24th Test century, was eventually caught by Zunaed Siddique at slip off left-arm spinner Mehrab Hossain.
Dilshan (47) was out seven balls earlier, caught behind against left-arm spinner Shakib Al Hasan, after a 95-run fifth wicket partnership with his skipper.
Bangladesh scored 178 runs in the first innings in response to Sri Lanka's 293 all out.
© Cricket World / Reuters 2008