Bangladesh successfully chased down New Zealand's 271-run target to win the final game of their tri-series, in Dublin on Wednesday.
The Tigers chased down their total with 10 balls to spare and secure victory by five wickets, taking a huge step towards qualifying for the 2019 World Cup as it places them sixth in the ICC ODI rankings, moving them above Sri Lanka in the standings.
The top eight by the cut-off date of September 30 are guaranteed automatic qualification for the World Cup finals in England.
An unbroken stand of 72 between Mushfiqur Rahim and Mahmudullah saw the Tigers to victory - Mushfiqur finishing 45 not out at exactly a run-a-ball, but the partnership was dominated by a superb innings from Mahmudullah who scored his 3,000th run in his 36-ball 46, with six fours and a six.
He took 14 off the 47th over, bowled by Hamish Bennett to make the last three overs a formality and fittingly Mahmudullah hit the winning boundary.
Bangladesh had the momentum going into the second innings after they had restricted the Black Caps to 270-8, with just 62 coming from the last 12 overs as five wickets fell.
Tamim Iqbal and Sabbir Rahman then carried it on with a second-wicket stand of 136 before both batsmen were dismissed for 65.
Tamim was caught at deep mid-wicket off Mitchell Santner and Sabbir run-out by the length of the pitch when he found himself at the same end as Mosaddek Hossain.
But despite Shakib Al Hasan (19) holing out to long leg with 72 still needed from 70 balls, it was to be New Zealand's last strike.
Bangladesh won in spite of a desperately poor fielding performance earlier which saw four dropped catches, including man-of-the-series Tom Latham before he had scored, and again the ball after he reached his fifty.
He was eventually bowled by Nasir Hossain (2-47) - impressing in his first match of the series - for 84 from 92 balls with 11 fours. The Black Caps also had a century second wicket stand of 133 between Latham and Neil Broom, who was dropped on 56. That miss cost only seven runs though as Broom swept to square leg soon after.
Latham's dismissal still left the Black Caps well placed on 167-3 in the 31st over and on course for a total of 300 but the wicket of the dangerous Corey Anderson (24) led to a collapse - at one stage they lost three wickets for two runs in 11 balls - and it needed Ross Taylor (60no) to hold the innings together.
The total proved insufficient though, with Bangladesh chasing down the target to earn a significant win towards World Cup qualifying, and ahead of this summer's ICC Champions Trophy.