Hasan was unbeaten on 33 and Mortaza was 25 not out as they lifted Bangladesh from a precarious 44-6 to 104-6 by lunch after the New Zealand bowlers, led by skipper Daniel Vettori, grabbed three quick wickets in the session.
The home team still need another 59 runs to avoid the follow-on.
Because the match became a two-day game after the first three days were washed out, Bangladesh must get to within 100 runs of New Zealand to avoid the follow-on.
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 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 during their unfinished 60-run stand for the seventh wicket.
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 won the first Test at Chittagong by three wickets, still harbour some hopes of forcing a result if they can enforce the follow-on.
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.