The 21-year-old turned his left arm with effect to dismiss Jamie How (16), Jesse Ryder (one) and Aaron Redmond (19) to jolt the visitors after Daniel Vettori took five wickets to shoot Bangladesh out for 245 in the first innings.
Hasan, better known for his left-handed batting, had How and debutant Ryder in successive overs, before trapping Redmond to wrest back the initiative for the home team who lost track in the morning.
In between left-arm spin partner Abdur Razzak trapped Ross Taylor for 12.
On a turning Divisional Stadium pitch, Vettori took three of the six wickets to fall in the space of just 57 runs to finish with 5-59, his 16th five-wicket haul.
The 29-year-old spinner dismissed Mushfiqur Rahim (79), Mashrafe Mortaza (nought) and Razzak (11) after Bangladesh resumed at the overnight score of 183-4.
Vettori was ably supported by paceman Iain O'Brien (3-36) and off-spinner Jeetan Patel who finished with 2-67.
Resuming with two set batsmen, Bangladesh were instantly pushed back by the Black Caps who through O'Brien dismissed Mehrab Hossain in the fourth over of the day for a fine career-best 83.
Mehrab, playing only his second Test, miscued a drive and was caught at short cover by Aaron Redmond. He hit 11 boundaries during his resolute 179-ball knock.
Mehrab and Rahim added an invaluable 144 for the fifth wicket.
Debutant Naeem Islam (14) added another 41 for the sixth wicket with Rahim before he unduly jumped out of his crease to Patel and was smartly stumped by Bredon McCullum.
Vettori then took charge, removing a dangerous looking Rahim, caught off a miscued sweep and two balls later forced a bat-pad edge off Mortaza for a sharp close catch.
Rahim struck 12 boundaries and a six during his 209-ball innings.
Three overs later, Vettori dismissed Razzak, caught behind before Hasan holed out at mid-on off Patel after scoring just five.