Debutant off-spinner Will Somerville took two wickets off successive balls to bring New Zealand within sight of a series-clinching victory as Pakistan slumped to 55-5 in the third and final Test in Abu Dhabi on Friday.
Somerville dismissed Haris Sohail (9) with the third ball of his first over and then had Asad Shafiq caught off the next to leave Pakistan tottering at lunch on the fifth day, chasing a 280-run target.
Opener Imam-ul-Haq was dismissed for 22 in the last over before lunch by spinner Ajaz Patel. Babar Azam was not out on four as Pakistan were rocked.
New Zealand now need another five wickets in the remaining 58.2 overs to clinch the series, their first away series win against Pakistan since 1969.
The series is currently tied at 1-1.
Pakistan were off to another disastrous start when Mohammad Hafeez was bowled by fast bowler Tim Southee for eight, his last innings in Test cricket.
Hafeez had announced he will retire from Tests after this match.
Medium pacer Colin de Grandhomme had first-innings centurion Azhar Ali caught behind for five before Somerville's double strike pushed Pakistan to the brink.
Somerville has figures of 2-4 in two overs.
Earlier, New Zealand declared their second innings on 353-7 after some 45 minutes of batting with Henry Nicholls remaining unbeaten on 126 and Kane Williamson dismissed at his overnight score of 139.
Leg-spinner Yasir Shah finished with 4-129, 29 wickets in the series.