Paceman Hasan Ali and leg-spinner Yasir Shah took five wickets each to put Pakistan in control on the third day as the hosts eye victory in the first Test at Abu Dhabi.
Hasan took his maiden five-wicket haul with 5-45 while Yasir finished with 5-110 -- his 14th five-wicket feat in an innings -- as New Zealand collapsed from 220-4 to 249-10 soon after the tea interval.
That left Pakistan with 176 to win the Test and at close they were 37-0 with Imam-ul-Haq on 25 not out and Mohammad Hafeez unbeaten on eight, needing another 139 to win with all ten wickets in hand and two days of play left.
BJ Watling (59) and Henry Nicholls (55) had Pakistan under pressure in the post lunch session with a fighting stand of 112 but Yasir took four wickets off just 15 balls to bring his team back into the match.
Soon after tea, Yasir had Nicholls caught by Sarfraz Ahmed and then in his next over trapped Colin de Grandhomme right in front of the stumps.
In the next over, Yasir ended Watling's 145-ball defiant knock with a leg-before and then sneaked through Wagner’s defence for nought.
Hasan then wrapped up the innings by bowling Ish Sodhi for 18 and Trent Boult caught off a miscued drive for nought to clinch his maiden five-wicket haul.
It was Hasan who brought Pakistan back in the first session.
Hasan trapped veteran Taylor leg-before with a sharp incoming delivery and then had Jeet Raval caught behind with a peach of an out-swinger for 46.
Raval had added 86 for the second wicket with Kane Williamson who made 37.
With just 12 runs into the lead, Williamson was bowled by leg-spinner Yasir Shah to a ball where he went back – beating the outside edge and removing the bail.
The second Test is in Dubai (November 24-28) and the third in Abu Dhabi (December 3-7).