Bangladesh avoided the follow-on against some spirited bowling by New Zealand as the second Test headed for a draw on the final day here on Wednesday.
The home team were facing potential defeat at 44-6 in their first innings before crucial knocks by all-rounders Shakib Al Hasan (49) and Mashrafe Mortaza (48) rescued them.
Hasan and Mortaza put on a fighting 78-run stand for the seventh wicket, enabling Bangladesh to declare their first innings at 169-9, six more than required to avoid the follow-on.
Batting a second time, the visitors reached 34-1 by tea with Aaron Redmond on 12 and Jesse Ryder unbeaten on 14. Jamie How was dismissed for eight.
New Zealand, who lead the two-match series 1-0 after winning the first Test in Chittagong, now lead by 127 runs.
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 falling 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, the New Zealand skipper, 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 the visitors' bowling with 5-66.
O'Brien, who finished with 3-31, had Mortaza caught before Abdur Razzak (16 not out) helped avoid the follow-on.
Bangladesh's hopes of levelling the series were dashed by bad weather on the first three days and by sloppy batting on Tuesday.
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.
New Zealand beat Bangladesh by an innings at Hamilton in 2001 after the first two days were rained off.