Neil Wagner struck twice before lunch on the fourth day as New Zealand left Bangladesh struggling to save the second Test match here today.
The hosts reached 87-2 in their second innings at the break, still 68 runs behind New Zealand's first innings total of 437 runs.
Tamim Iqbal was carrying the hopes of Bangladesh with 32 not out along side Mominul Haque, unbeaten on 20.
More From This Section
Anamul's highest score in the series included four boundaries.
Ayub fell for just nine runs as Ross Taylor took the catch at slip.
Earlier New Zealand resumed their innings on 419-8 but added just 18 runs with their remaining two wickets.
Ish Sodhi was run out by Mominul for 58 before Abdur Razzak trapped Trent Boult in front to wrap up the innings seven overs into the morning session.