A record ODI partnership from middle-order batsmen Shakib Al-Hasan and Mahmudullah kept Bangladesh's hopes of qualifying for the group stage alive, in turn sending New Zealand packing from the Champions Trophy.
Williamson and Taylor work undone by limp finish
Both sides were only too aware of what was at stake. A defeat would leave them bottom of the group and out of the competition, whilst a victory would ensure qualification if England beat Australia in the final group game.
New Zealand went into the contest as favourites but experienced defeat to their opponents in a warm-up game just a fortnight ago. However, Kane Williamson's side settled well as Martin Guptill and Luke Ronchi made an opening stand of 46. It was to be the introduction of third bowler Taskin Ahmed that turned the tide as his consistent line and length caused problems for the New Zealand batsmen as they failed to get bat to ball on numerous occasions.
Taskin dismissed Ronchi for 16 before Guptill fell to Rubel Hossain for 33 as the New Zealanders continued a trend of the tournament whereby they failed to develop starts into meaningful scores.
The one man who has dragged New Zealand through is captain Williamson. After making a century against Australia and 87 against England, the number three made a telling partnership with the experienced Ross Taylor. Yet a patient 87 from 103 balls was abruptly ended when Williamson was needlessly run out after a breakdown in communication.
At 152-3, New Zealand still found themselves in a healthy position before Taylor added to the score with a partnership of 49 alongside Neil Broom. However, Taylor's dismissal for 63 from Taskin sparked another New Zealand collapse as Mossadek Hossain tore through the middle order. They managed just 64 runs in the last 11 overs as Mossadek took three wickets, eventually posting a modest total of 265-8.
Centuries from Shakib and Mahmudullah spark incredible run chase
Bangladesh smelt a chance but they soon saw their hopes disintegrate as Tim Southee produced a fine spell of swing bowling. Two LBWs and a caught behind left Bangladesh 12-3 within the first five overs.
Mushfiqur Rahim hung around to make 14 before being bowled by Adam Milne as Bangladesh slipped to 33-4. Three-figures looked distant, let alone the target of 265.
Yet Bangladesh don't panic when they are underdogs. Once regarded as minnows of international cricket, they are now well established on the big stage, particularly with an electric middle-order.
Mahmudullah joined Shakib at the crease and the pair simply picked off any loose deliveries and continued to rotate the strike. Williamson worked his way through seven bowlers as he tried to find a breakthrough but the Tigers continued to slowly work their way towards the target.
The 50 partnership came, then 100, 150, 200...New Zealand were in all sorts of trouble. Just after the double-century was made, Shakib played a terrific scoop shot to bring up three-figures. He then released the shackles with an aggressive approach and by the time Trent Boult dismissed him for 114 the contest was over.
The 224-run partnership was the best Bangladesh have seen in limited overs cricket and left them just nine runs short of their target with 21 balls to spare. Mahmudullah soon ticked over to 100 before Mosaddek helped him seal the victory with the best part of three overs remaining.
It leaves New Zealand packing their bags and Bangladesh waiting. Can England defeat Australia to help the Tigers into the final four of the competition?