New Zealand were 131-2 in their second innings against Pakistan — trailing by 197 runs — at stumps on third day of the second Test match in Dubai.
Earlier leg-spinner Yasir Shah took a career-best eight wicket haul as New Zealand were forced to follow-on. Yasir's 8-41 in 12.3 overs rocked New Zealand to 90 all out.
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 Imamul 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, Sharjah and Abu Dhabi).
Yasir Shah was in on the action once again in the second innings as well — picking up both the wickets which fell in New Zealand’s innings.
At close of play, Ross Taylor and Tom Latham were unbeaten on 49 and 44 runs respectively.