text: The hosts closed on 152-3, a lead of 128, after 10 wickets fell in the day.
  Mehedi Hasan Miraz (6-82) reduced England to 144-8 but Chris Woakes and Adil Rashid put on 99 to give England a first-innings lead of 24.
  However, Imrul Kayes hit an unbeaten 59 and Mohammad Mahmudullah made 47 as Bangladesh regained the initiative.
  Mahmudullah was bowled by England debutant Zafar Ansari with the final ball of the day after the left-arm spinner had earlier dismissed Tamim Iqbal for his first international wicket.
  Bangladesh's only victories since their first Test in 2000 have come against Zimbabwe and the West Indies.
  BBC cricket correspondent Jonathan Agnew
  Another fluctuating Test sees England on the back foot and Bangladesh once again contemplating victory.
  England's bowlers created little pressure and it isn't immediately obvious who will step up tomorrow morning to bowl Bangladesh out. What is certain is that 250 would take some getting and Bangladesh are well on course for setting England a real challenge.
  Mehedi, 19, tormented England in the first Test in Chittagong and became only the third spinner to take five wickets in the first innings of each of his first two Test matches.
  Having taken two wickets on day one to reduce England to 50-3, off-spinner Mehedi bowled Moeen Ali in the third over of the day, with the England all-rounder playing an ill-advised sweep.
  Ben Stokes was out in the following over, caught off Taijul Islam, bringing Jonny Bairstow to the crease.
  He put on 45 with Joe Root to steady the visitors after they had slipped to 69-5, but Mehedi returned to trap Bairstow lbw for 24 with his first ball of a new spell - and then had Ansari caught at gully for his fifth wicket of the innings.
  Media playback is not supported on this device
  Root batted well to score his 23rd Test half-century, but when Taijul took his wicket England were rocking at 144-8.
  However, Woakes (46) and Rashid (44) excelled as Bangladesh captain Mushfiqur Rahim rotated his bowlers, their partnership of 224 balls and 127 minutes taking England from a deficit of 76 into the lead.
  The stand was England's highest for the ninth wicket in Asia and was in stark contrast to the Bangladesh innings, where they fell from 171-1 to 220 all out.
  The partnership perhaps should have been cut short, though.
  Woakes, on 38 at the time, hit a high full toss from Sabbir Rahman straight to the mid-wicket fielder, but he was given a reprieve when TV umpire Chris Gaffaney judged that the ball had reached the batsman above waist height and gave a no-ball, despite later replays suggesting the wicket should have stood.
  Woakes was eventually out when Mehedi returned with the new ball and claimed his sixth wicket, while Steven Finn was the last man out for 0 off the bowling of Taijul.
  Bangladesh's openers Tamim and Kayes batted positively in the final session to wipe out England's lead, reaching 65 before Ansari dismissed Tamim to claim his first Test wicket.
  England captain Alastair Cook then caught Mominul Haque at slip off Stokes in next over and the tourists seemed to have the momentum.
  However, Kayes and Mahmudullah played freely to put on 86 before Mahmudullah played a loose attacking shot and was bowled by Ansari with what turned out to be the final ball of the day.
  Bangladesh scored at almost five runs per over in the final session as Finn and Rashid, both wicketless in the first innings, went at six runs per over, while Woakes conceded 14 from his two overs.
  England all-rounder Chris Woakes on BBC Test Match Special: "That wicket at the end gives us a bit of hope going into tomorrow. I think we've had a reasonably good day.
  "We'd have liked to have got a few more runs early on this morning but the partnership between myself and Rash got us up ahead of them.
  "I don't think the pitch will get any better - it will only get worse, if anything. We've got a long batting line-up but we don't want to chase too many.
  "It's important when we come out tomorrow we firstly try to keep the run rate down so they don't get away from us, but also look to take wickets. It's a tricky thing to do.
  "If we can pick up a few early ones, we know they can roll easily."
target: England face a battle to prevent Bangladesh earning their most famous Test victory after an absorbing second day of the second Test in Dhaka.