Pakistan ended a run of 12 straight one-day international losses to New Zealand with a comprehensive victory in Abu Dhabi to draw level in the series at 1-1.
A supreme bowling display from Pakistan limited the tourists to just 209-9 nine from their 50 overs, with Ross Taylor managing a dogged 86 not out.
Shaheen Shah Afridi took four wickets and showed quick thinking to run out Kane Williamson for one when the New Zealand captain failed to recover his ground at the non-striker's end.
Pakistan suffered a worrying blow in the 13th over when Imam-ul-Haq was hit on the grille of his helmet by a bouncer from Lockie Ferguson, sending him slumping to the floor.
The opener, who was able to walk off the field, was seen being carried into an ambulance but was later discharged from hospital after scans came back all clear.
It did not put Pakistan off and they did not lose a wicket until Fakhar Zaman fell for 88 with the score on 155, Babar Azam (46) then falling in the same Lockie Ferguson over, but Pakistan won with six wickets and nine and a half overs to spare.
The deciding ODI takes place in Dubai on Sunday.