Shakib Al Hasan and Mahmudullah smashed brilliant centuries as they stitched a record 224-run stand to help Bangladesh recover from a top-order collapse and register a stunning five-wicket win over New Zealand in their last group match of the ICC Champions Trophy in Cardiff, on Friday.
Chasing 266 for victory to keep their hopes alive of making it to the semi-finals, Bangladesh were reduced to a precarious 33 for four in the 12th over before Shakib (114) and Mahmudullah (102 not out) turned the match on its head with a remarkable batting display to help their side notch up their first win of the tournament.
The duo batted brilliantly for 34.5 overs for the fifth wicket and orchestrated a sensational comeback for Bangladesh after a devastating three-wicket burst from Tim Southee had rocked them early on.
Bangladesh eventually chased down the target with 16 balls to spare, reaching 268 for five, to fashion one of the most memorable victories in their ODI history.
The 224-run stand between Shakib and Mahmudullah is the highest for Bangladesh for any wicket in ODIs, eclipsing the earlier 178 between Tamim Iqbal and Mushfiqur Rahim against Pakistan in 2015.
Shakib, who hit his seventh ton in his 176th match, struck 11 fours and a six from 115 balls while Mahmudullah, who got his third ton in his 144th game, had eight fours and two sixes from 107 deliveries in his unbeaten 114.
With the loss, New Zealand are out of the tournament, after finishing at the bottom of Group A with just one point which they got after their match against Australia was washed out. They had lost to England by 87 runs.
Despite the win, Bangladesh -- who now have three points from three matches -- are still uncertain of a semi-final berth and they will have to wait the outcome of the Group A match between England and Australia in Birmingham on Saturday.
If Australia win the match then they will advance to the semi-finals along with England, who have already qualified, while Bangladesh will be knocked out.
Bangladesh's run chase began in a dramatic fashion with their in-form opener Tamim Iqbal dismissed for a duck in the second ball of innings.
Iqbal, who had hit a ton and a 95 in the earlier two matches, played the wrong line off a Southee delivery and was adjudged leg before wicket.
Southee then dismissed Sabbir Rahman (8) in his next over, caught behind by wicketkeeper Luke Ronchi before he accounted for Soumya Sarkar (3) in the fifth over.
The top-order collapse meant that Bangladesh went into a shell and runs were trickling only in singles.
New Zealand were not to be denied their fourth wicket as Adam Milne dismissed Mushfiqur Rahim (14) in the 12th over as the fast delivery crashed through the batsman's gate to send the middle stump cartwheeling.
The Kiwis were in command but Shakib and Mahmadullah slowly and steadily turned the tables in Bangladesh's favour. The duo grafted for runs initially ensuring that no further damage was done before they opened up to hit some exquisite shots to run away with the match.
Mosaddek Hossain's late three-wicket burst triggered New Zealand's batting collapse as Bangladesh restricted the Kiwis to 265 for eight in their last group match in Cardiff.
The 21-year-old off-spinner stole the show as he grabbed three wickets in the space of 12 balls to turn the match on its head in the ICC Champions Trophy Group A match at Sophia Gardens.
Mosaddek took two wickets -- that of Niel Broom (36) and Corey Anderson (0) -- in the 44th over before he dismissed James Neesham (23) in his next over as the Kiwis struggled in the final few overs.
Bangladesh captain Mashrafe Mortaza's decision to introduce Mosaddek in 42nd over turned out to a masterstroke as New Zealand could add just 62 runs from the final 10 overs.
Electing to bat, New Zealand were nicely set up for a challenging total by captain Kane Williamson (57 off 69 balls) and Ross Taylor (63 off 82 balls) with solid half-centuries but their good work were undone later as wickets tumbled in a heaped at the death.
New Zealand were poised for a big score, having reached 203 for four at the end of the 40th over but Hossain's late wickets spoiled the script.
The Kiwis had started in confident fashion with Martin Guptill (33) and Luke Ronchi (16) finding the boundaries regularly in the first few overs.
Taskin Ahmed made the breakthrough in the eighth over by dismissing Ronchi who was caught at mid-on, while Guptill was trapped leg before wicket by Rubel Hossain in the 13th over.
New Zealand consolidated their innings with captain Kane Williamson and Ross Taylor keeping the scoreboard moving mostly through singles and doubles with the occasional boundary in between.
Williamson brought up his fifty in the 15th over with a single off Rubel but he could not carry on as he was run out following a horrible mix-up with Taylor in the 30th over.
After Williamson's departure, Taylor was going strong but he had a soft dismissal in the 39th over as he mistimed a shot to Mustafizur Rahman off Taskin.
The start of the match was delayed for an hour due to rain but there was no reduction in the overs.