Shakib Al Hasan and Mahmudullah each struck centuries as their incredible record ODI stand for Bangladesh ensured a victory over New Zealand that kept their ICC Champions Trophy hopes alive and knocked out the Black Caps.
New Zealand appeared on shaky ground after posting 265-8 at Sophia Gardens in a match both sides had to win, and Shakib (114) and Mahmdullah (102 not out) combined magnificently for a partnership of 224 to undo Tim Southee's (3-45) inspirational bowling performance for Kane Williamson's side.
Trent Boult (1-48) had lamented a struggle to find swing at the tournament in the build-up but his bowling partner Southee caused Bangladesh significant problems, accounting for the in-form Tamim Iqbal for a second-ball duck.
However, the movement Southee had been able to generate disappeared after New Zealand reduced Bangladesh to 33-4, Shakib and Mahmudullah sealing a five-wicket win that means they will progress if England beat Australia in the Group A finale on Saturday.
Meanwhile, New Zealand will be left to rue another failure to build on impressive displays from Williamson (57) and Ross Taylor (63).
Martin Guptill belted an early maximum into the River Taff, but his and Luke Ronchi's opening partnership lasted just seven overs before the wicketkeeper-batsman (16) mistimed to mid-on and Guptill was gone for a flighty 33 when he was trapped in front to Rubel Hossain (1-60).
Williamson and Taylor have been the backbone for many a Black Caps innings and they once again steadied the ship with an 83-run union that was only broken when the skipper set off for a suicidal single and was run out.
As was the case against England, Williamson's dismissal sucked momentum from New Zealand and after Taylor fell, Mashrafe Mortaza played his joker card - the returning Mosaddek Hossain (3-13).
Mashrafe had forgotten his spinner's name at the toss but Mosaddek's performance grabbed the spotlight as Neil Broom (36) and Corey Anderson (0) fell in the same over before he returned to oust Jimmy Neesham for 23.
After the Black Caps ended their innings with regular wickets, Southee began the Tigers' dig in similar, phenomenal fashion.
Tamim perished lbw - wasting the Tigers' review - before Sabbir Rahman (8) and Soumya Sarkar (3) were undone by Southee and Mushfiqur Rahim (14) was clean bowled by Adam Milne (1-58) to leave Bangladesh floundering.
However, the white ball's stardust soon faded and the Black Caps struggled to make anything happen as Mahmudullah and Shakib calmly played the Tigers right back into contention.
A six over the leg side brought up Shakib's ton, and he motored Bangladesh towards the finish line with successive fours before Boult bowled him.
Mahmudullah then reached three figures with a launched shot over square leg for four, with Mossadek (7 not out) fittingly hitting the winning boundary to cap a memorable triumph.