England need two more wickets on the final day to keep their all-winning record in tests against Bangladesh intact with the hosts 33 runs away from a famous victory in the closely-contested opening test at Chittagong.
Chasing 286 for their first win in nine tests against England, Bangladesh reached 253 for eight when bad light ended play on the fourth day on Sunday. Debutant Sabbir Rahman (59) and Taijul Islam (11) were at the crease.
England batted for some 20 minutes in the morning, adding 12 runs to their overnight second-innings total of 228 for nine before they were bundled out for 240.
Bangladesh left-arm spinner Shakib Al Hasan finished with 5-85.
Openers Tamim Iqbal (nine) and Imrul Kayes (43) gave Bangladesh a decent start on a Zahur Ahmed Chowdhury Stadium pitch that offered plenty of turn and bounce for the spinners.
England captain Alastair Cook started with spin from both ends but did not see any success until the 10th over when Tamim was out to a bat-pad catch off Moeen Ali.
Kayes was the more attacking of the pair and he continued batting positively, adding 46 for the second wicket with Mominul, who was dropped on four by wicketkeeper Jonny Bairstow off Moeen.
The left-handed Kayes was not afraid to hit the ball in the air against the spinners and also employed sweep shots, both conventional and reverse, to good effect to find six boundaries in his 61-ball knock.
However, he was out shortly before the lunch break trying to sweep leg-spinner Adil Rashid, the ball hitting his glove and looping to Joe Root at slip for a simple catch.
Mominul Haque (27) and Mahmudullah (17) both fell leg before to Gareth Batty, who is playing his first test after a gap of 11 years, shortly after the lunch break.
Shakib (24) then added 32 for the fifth wicket with Mushfiqur before edging Moeen behind to Bairstow.
Captain Mushfiqur Rahim (39) and Sabbir were the last recognised batting pair for the hosts and added 87 for the sixth wicket, putting the pressure back on England.
Batty returned for a spell and finally sent back Mushfiqur, caught at short leg with a delivery that spun sharply and bounced awkwardly for the batsmen to handle.
England thought they had the match in the bag when Stuart Broad, who saw Sabbir dropped on 34 by Bairstow off his bowling, dismissed debutants Mehedi Hasan and Kamrul Islam in quick succession.
But Sabbir and Taijul remained unbeaten, adding 15 for the unbroken ninth wicket to push the match into the final day