A gripping first Test will go to a final morning, with both England and Bangladesh in with a shout of what will be - one way or the other - a heart-stopping win.
At the end of a drama-filled fourth afternoon, in which the impetus swung one way, then back, and then back again, Bangladesh closed on 253 for eight, still needing 33 to complete the greatest result in their Test history.
That England were still in with a shout was thanks to Gareth Batty and Stuart Broad, who combined late in the day to knock over three wickets after Bangladesh had reached 227 for five - within touching distance of their first Test win over their opponents after eight straight defeats.
That followed a sixth-wicket stand of 87 between Bangladesh captain Mushfiqur Rahim and debutant Sabbir Rahman, who was still there at stumps on 59. National-hero status awaits if he can finish the job on Monday.
While those two were together, England began to look bereft of ideas, with Alastair Cook setting deep-set fields in search of the right balance between defence and attack. He didn't always get it right, and it was clear he didn't trust his leg-spinner Adil Rashid to keep things tidy.
But the return of Batty, who had been ignored for much of the afternoon, did for Rahim, well caught by Gary Ballance in the leg trap for 39, before Broad steamed in to get rid of Mehedi Hasan and Kamrul Islam Rabbi.
And England might even have completed victory before bad light brought a premature close had Joe Root clung on to a sharp slip catch after Batty had found the edge of No 10 Taijul Islam.
Instead, both sides will return on Monday to complete a game that has been a wonderful advert for Test cricket in this part of the world - and has underlined both the deficiencies in this England team and the progress made by Bangladesh.
Set 286, they had made a positive start to their chase, losing Tamim Iqbal in the ninth over with 35 on the board as Ballance held a smart catch at short leg off Moeen Ali.
And at 81 for one with lunch approaching, they had enjoyed comfortably the better of the morning session, having already polished off England's two remaining second-innings wickets at a cost of just 12 runs.
But Rashid persuaded Imrul Kayes, on 43, into an ill-judged sweep, which ballooned off the glove and over the batsman's head to Root at slip.
Batty then struck in successive overs after lunch, removing Mominul Haque on leg-before review (the 22nd review of this extraordinary Test), then trapping Mahmudullah to make it 108 for four.
When Moeen Ali ripped one across the left-handed Shakib Al Hasan, providing Jonny Bairstow with a sharp take high to his left, Bangladesh had slipped to 140 for five, and an England victory looked only a matter of time.
But Rahim and Sabbir set about chipping away at the total, as the crowd grew along with the hosts' expectations.
Rahman twice deposited Moeen over the ropes, and England's mood wasn't helped when Jonny Bairstow put down a tough leg-side chance off Broad when Rahman had 34.
And Broad lost his temper with Kumar Dharmasena when the umpire signalled that England had taken too much time deciding whether to review a leg-before appeal against Rahman on 38 - though reviews showed it would have been not out anyway.
Earlier, England added an underwhelming 12 runs to their overnight 228 for 8, losing Broad to a careless run-out in the second over, and Batty for three, leg-before to Taijul Islam.
It left Bangladesh needing 286, comfortably more than they have ever made to win a Test. Indeed, they had only twice chased successfully in the fourth innings before.
Whether they will get any sleep on Sunday night considering the possibility is another matter.