England manoeuvred themselves into pole position in the second Test against Bangladesh but still need quick wickets on the final morning to ensure victory against the minnows.
The tourists have been on the back foot for long periods in the match but three wickets on the fourth evening advanced the England cause to leave the Tigers 172 for six - a lead of 95.
That means the tourists' best hope of completing a face-saving victory against opponents with 57 defeats from 66 outings rest on early wickets and a modest chase.
England started the day by extending their first-innings lead to 77 but had a ragged afternoon in the field, with Jonathan Trott's howler at point the worst of a handful of downed chances, before regaining their composure to expose the hosts' tail.
Tim Bresnan resumed on 74 in his second Test innings and nudged his way to 91 before he was stumped skipping down the track to Abdur Razzak.
James Tredwell made a positive 37 of his own before falling in identical fashion to end the England innings on 496.
Many opening batsmen would have been looking to merely survive the awkward pre-lunch period that followed, but Tamim Iqbal has displayed a fearless streak since the start of the series.
He carved his way to a devastating 85 in the first session of the match and was soon looking to pepper the boundary once again.
By contrast, Imrul Kayes has watched his stock plummet over the course of the series, a trend which continued when he was bowled by Stuart Broad off the thigh pad for four.
England were eager for more wickets and Tredwell could have had Tamim on 15 and 26.
Matt Prior grassed the first, a tough chance behind the stumps, and Tredwell himself shelled a firm return catch after lunch.
Graeme Swann was not introduced until the 21st over having spent some time off the field and had a big lbw appeal turned down off his first ball.
Tredwell was continuing to cause problems, coaxing Tamim to edge past slip before seeing Trott drop the simplest of catches at point to give the opener yet another life.
Tamim and Junaid Siddique took advantage of the slump in the field to take the hosts into the lead, with the former bringing up a most fortunate half-century soon after.
He eventually departed for 52, Broad finally holding a catch to open Swann's account.
Debutant Jahurul Islam, who bagged a duck in the first innings, got off the mark in Test cricket with a maximum off Swann and then lofted Tredwell for six more.
He was living dangerously, though, offering a hard, low caught and bowled chance to Swann and then snicking between keeper and slip for four.
After a series of plays and misses, inside edges and aerial shots without success it took a stroke of fortune to hand England a third wicket.
Junaid (34) was the man to go, caught and bowled by Tredwell after the the ball looped back to the bowler off Alastair Cook's boot at silly point.
Shakib survived a similar appeal in the first innings when the TV umpire was unsure if the ball had hit the ground first, but this time the decision was clear.
New batsman Mahmudullah fell for six in the fourth over after tea, Bresnan pounding in and locating the outside edge to make it 130 for four.
The Yorkshireman thought he had Jahurul for 38 before drinks but this time there was no bat on the way through to Prior.
Swann, who was being sparsely used, was clearly in some discomfort but returned to the fray to rattle Jahurul's stumps with one that gripped and turned.
Mushfiqur Rahim - a thorn in England's side since they first touched down in Dhaka - was next in but made just three before Broad snuck through his defences one ball after seeing a strong leg before shout rejected.
Shafiul Islam was sent out to protect Naeem Islam before the close, with England due a new ball after 12 overs tomorrow.