New Zealand clinched the two-match series 1-0 after they won the first Test at Chittagong by three wickets. They nearly pulled off a highly unlikely win after the first three days were washed out.
The home team were facing a possible follow-on and with it a defeat at 44-6 before brilliant knocks by all-rounders Shakib Al Hasan (49) and Mashrafe Mortaza (48) helped them avoid the ignominy of batting for a second time.
With not much to play for, the tourists batted a second time and reached 79-1 before both captains decided to call off the match. Jesse Ryder followed his 91 in the first-innings with an unbeaten 39 while Aaron Redmond made 30 not out.
Opener Jamie How was dismissed for eight.
Earlier Hasan and Mortaza put on a fighting 78-run stand for the seventh wicket which enabled Bangladesh to declare their first innings at 169-9, six more than required to avoid the follow-on.
Because the match became a two-day game after the first three days were washed out, Bangladesh needed to reach within 100 runs of New Zealand's first-innings score of 262-6 declared to avoid batting a second time.
Resuming at 13-3, the home side lost Mehrab Hossain (seven) when off-spinner Jeetan Patel turned one sharply into him, trapping him in front of the stumps.
Opener Tamim Iqbal, who saw three wickets fall in one Daniel Vettori over on Tuesday, took the score to 44 in the company of Mushfiqur Rahim before both fell in successive overs.
Vettori had Iqbal caught off a miscued drive while Rahim gloved a short delivery from paceman Iain O'Brien to wicket-keeper Brendon McCullum after scoring seven.
Mortaza and Hasan took Bangladesh past their lowest Test score of 62 made against Sri Lanka at Colombo last year before Vettori ended Hasan's resistance by trapping him leg-before.
Vettori was the pick of visitors' bowling with 5-66, finishing with 14 wickets in two Tests.
O'Brien, who finished with 3-31, had Mortaza caught before Abdur Razzak (16 not out) avoided follow-on.
Bangladesh's hopes of levelling the two-match series were dashed by bad weather on the first three days and by sloppy batting on Tuesday.
New Zealand, who beat Bangladesh by an innings victory in three days at Hamilton in 2001 after the first two days were washed out, had harboured similar hopes until lunch before Hasan and Mortaza batted solidly.
There have been 19 cases of a Test match finishing inside two days but no team has ever won a Test after the first three days were washed out.