New Zealand have beaten Pakistan by 138 runs in a thrilling test match in Hamilton.
The result means that New Zealand win the series 2-0 and jump to 6th on the test rankings.
Chasing 369 for victory Pakistan looked to have set themselves nicely when they were 158 for one at tea.
But the new ball and more attacking bowling from New Zealand put pressure on the Pakistan batting. Pakistan lost their last nine wickets for 72 runs to crash to a 138-run defeat.
Neil Wagner grabbed three wickets to wrap up the tail after Tim Southee, Matt Henry, Colin de Grandhomme and spinner Mitchell Santner had all claimed victims in the final session.
Pakistan, who are ranked second in the world, had not lost a test series since they were beaten 2-0 by Sri Lanka in August 2014, winning five and drawing two, which included one tied series in England.