Trent Boult secured another five-wicket bag and BJ Watling set a record for wicketkeeper dismissals, as the Blackcaps finally overcame Bangladesh for a test win in Hamilton.
After resuming the day at 174/4, the tourists raced through to 310/4 at lunch on the fourth day - still 171 runs away from forcing New Zealand to bat again.
Soumya Sarkar was the man of the morning for the visitors, notching his maiden hundred off just 93 balls to set a record for the fastest test century by a Bangladesh player.
But Boult clean-bowled him for 149 off 171 balls, with the score at 361. Soumya and captain Mahmudullah had put on 235 runs for the fifth wicket.
Soon after Soumya's departure, Mahmudullah brought up his century off 183 balls to continue the fightback, but with the scalps of Soumya, Liton Das and Abu Jayed, Boult had his seventh five-wicket bag in tests.
Mahmudullah eventually reached 146, but when he was finally caught by Boult, off Tim Southee's bowling, his team still needed 52 runs to make New Zealand bat again, with just one wicket in hand.
Four balls later, tailender Ebadat Hossain edged Southee to Watling without adding to the score and the match was over. Watling's catch carried him past Adam Parore for a record 202 dismissals.
The NZ bowlers struggled to get much purchase from a Seddon Park pitch that was now almost devoid of life.
On Saturday, the New Zealand batsmen piled on the runs en route to a mammoth first innings total of 715/6 declared, highlighted by skipper Kane Williamson's unbeaten 200.
Openers Jeet Raval (132) and Tom Latham (161) also reached three figures, making it the first time that all three of New Zealand's top order had recorded centuries in the same innings.