Glenn Phillips scored an unbeaten 40 under pressure as New Zealand beat Bangladesh by four wickets in the second Test on Saturday to finish the two-match series level.

Set a chase of 137 in Dhaka, the visitors reached 139-6 an hour into the fourth day's final session with Phillips, who made 87 in the first innings, receiving able support from Mitchell Santner.

Santner capped in on a fine all-round performance with 35 not out after his 3-51 earlier with the ball.

Mehidy Hasan Miraz claimed 3-52 and Taijul Islam chipped in with 2-58 before Phillips and Santner, who shared 70 in their unbroken seventh-wicket stand, denied Bangladesh their hopes of a first Test series win over the Black Caps.

Earlier, Ajaz Patel took 6-57 for his fourth five-wicket Test haul and Santner complemented with his left-arm spin to help New Zealand bowl out Bangladesh for 144 runs in the second innings.

Zakir Hasan was the only batsman to put up a fight, top-scoring with 59 after the hosts resumed on 38-2.

New Zealand had an eight-run lead in the first innings with Phillips guiding the side to 180 in reply to Bangladesh's 172.

Fifteen wickets fell on the opening day before rain washed out the entire second day and the opening session of the third.

Bangladesh won the opening Test in Sylhet by 150 runs.