Leg-spinner Yasir Shah took a career best eight wicket haul as New Zealand were forced to follow-on on the third day of the second Test in Dubai on Monday.
Yasir's 8-41 in 12.3 overs rocked New Zealand to 90 all out and after follow-on they were 39-1 at tea, needing another 289 runs with nine wickets left to avoid an innings defeat.
Tom Latham (19) and Ken Williamson (13) were at the crease as Yasir's destruction gave Pakistan a good chance of levelling the series after losing the first Test by four runs in Abu Dhabi last week.
Yasir dismissed opener Jeet Raval for his ninth wicket in the match, stumped for two.
Rain had delayed the start of the third day by an hour but when the action started Yasir was lightening, bowling to his best ability on a turning Dubai stadium pitch.
Yasir dismissed Latham (22), Ross Taylor (nought) and Henry Nicholls (nought) in his ninth over, triggering a collapse during which New Zealand lost all their ten wickets for just 40 runs after being well set on 50 without loss.
Yasir's bowling figures -- his 15th five-wicket haul -- beat his previous best of 7-76 against Sri Lanka at Galle in 2015 and also the best against New Zealand.
Intikhab Alam (7-52) held the record for Pakistan's best bowling against New Zealand, achieved at Dunedin in 1973.
New Zealand, resuming at 27 without loss, lost Raval in an unfortunate way as he tried to reverse sweep Yasir but the ball deflected off his bat to his thigh and hit the stumps.
Raval top-scored with 31.
From 50-1 it became 61-2 when Yasir had Latham caught at short-leg by Imam-ul-Haq off the first ball of his ninth over.
Two balls later he bowled experienced Taylor with a beautiful delivery that turned and beat the forward push by the batsman.
Off his fifth ball Yasir bowled Nicholls through the gap between bat and pad. It was Yasir who ran Bradley-John Watling run out soon after lunch for one before dismissing Ish Sodhi, Neil Wagner, Ajaz Patel and Trent Boult -- all without scoring in the space of nine balls.
Six New Zealand batsmen fell without scoring, making it the fifth occasion in a Test when six batsmen failed to score in an innings.
Williamson remained unbeaten on 28, watching wickets fell like nine pins at the other end.
With Sodhi's wicket Yasir also completed 100 wickets in 16 Tests in United Arab Emirates (Dubai, Sharja and Abu Dhabi).