Bangladesh's ninth-wicket pair of Mohammad Mahmudullah and Shafiul Islam hammered 58 runs to send England crashing to a two-wicket defeat in the World Cup on Friday.
The Tigers appeared down for the count when they plunged to 169-8 in the 40th over chasing a modest target of 226 in the day-night game at the Zahur Ahmed Chowdhury stadium in Chittagong.
But Mahmuddullah (21 not out) and Shafiul (24 not out) conjured an unlikely victory in front of 18,000 screaming home fans to resurrect Bangladesh's campaign in the tournament they are co-hosting with India and Sri Lanka.
Bangladesh, who have four points from as many games, must still beat the Netherlands and power-packed South Africa in their remaining matches to ensure a place in the quarter-finals from Group B.
England remained on five points from five matches, a point behind the West Indies who have played a game less.
Opener Imrul Kayes top-scored with 60, adding 82 runs for the fourth wicket with skipper Shakib Al Hasan (32), to lift the home side to 155-3 in the 31st over.
England hit back to take five wickets for 14 runs, before Mahmuddullah and Shafiul smashed pace and spin alike to seal a dramatic win with one over to spare.
England paid dearly for bowling 23 wides as the late evening dew made it difficult for bowlers to grip the ball.
Jonathan Trott and Eoin Morgan were the only England batsmen to defy Bangladesh's spinners, scoring half-centuries before their team was dismissed for 225 in the final over.
Trott hit 67 and left-hander Morgan, who arrived in Chittagong on Tuesday to replace the injured Kevin Pietersen, made an immediate impact with a fluent 63 off 72 balls.
The duo put on 109 for the fourth wicket after England, sent in to bat by Shakib on a sluggish pitch, slipped to 53-3 in the 17th over.
The partnership was broken by a brilliant catch from Kayes, who dived in front at deep square-leg to hold the ball after Morgan skied a sweep against off-break bowler Naeem Islam.
Morgan's dismissal triggered a collapse in which England lost their last seven wickets for 63 runs after being well-placed at 162-3 in the 39th over.
Naeem finished with 2-29 from eight overs, and left-arm spinners Abdur Razzak and Shakib also claimed two wickets each.
Matt Prior, England's new opener in place of Pietersen, made 15 when he was dismissed in bizarre fashion, stumped by his Bangladesh counterpart Mushfiqur Rahim off Razzak's first delivery.
Rahim removed the bails off a wide ball down the leg-side, but even though Prior had dragged his back foot in just in time, he again wandered out of his crease.
Seeing the batsman out of his ground, a quick-thinking Rahim pulled out a stump to ensure the decision, which was referred to the TV umpire, went in his favour.
Bangladesh next play the Netherlands in Chittagong on Monday, while England clash with the West Indies in Chennai next Thursday.