Abu Dhabi, United Arab Emirates: Pakistan was on the cusp of a huge victory in the first test against New Zealand after reducing the Black Caps to 174-8 in the second innings on the fourth day of the first test on Wednesday.
Chasing a near impossible 480-run target on a slow, turning pitch, New Zealand's top order crumbled against the spin duo of Zulfiqar Babar (2-30) and Yasir Shah (2-49) before falling to the reverse swing of Rahat Ali (2-38).
Pakistan declared at 175-2 for an overall lead of 479 runs after Mohammad Hafeez smashed his first test century in two years, hitting 12 boundaries and two sixes in his 130-ball knock.
New Zealand captain Brendon McCullum top-scored with 39, but once Babar broke through the opening stand of 57, only tail-enders Ish Sodhi and Mark Craig showed late resistance and remained unbeaten on 27 each, still trailing Pakistan by 306.
Sodhi and Craig defied Pakistan spinners for nearly an hour, after the Kiwis were 138-8 and it looked like Pakistan would wrap up its third successive test victory in the United Arab Emirates.
Pakistan defeated Australia 2-0 in the preceding test series with a 356-run victory in the second test at the same venue.
The New Zealand top order couldn't match the defiance of Sodhi and Craig when Pakistan declared half an hour after lunch.
McCullum and first-innings century-maker Tom Latham added a quick 57 against the bowling of Ali and Imran before Pakistan struck thrice before tea.
Shah took a brilliant diving catch off Latham's top-edged sweep off Babar, and then had McCullum lbw off a googly which struck low on the front pad. Latham scored 20. Ross Taylor's disappointing return to international cricket continued when he was also out plumb lbw off Shah for 8 as New Zealand lost three wickets in the space of 12 runs.
Kane Williamson and Corey Anderson took the total to 111-3 before another collapse saw three wickets lost for a run.
Williamson was stumped on 23 when he misread Hafeez's straight delivery, and Ali took the wickets of James Neesham and BJ Watling for ducks off successive deliveries.
Anderson, out for 23, surprisingly didn't go for a video review which could have saved him, as he was struck on the back foot while offering no shot to Imran's delivery, and umpire Rod Tucker adjudged him lbw. Video replays clearly showed the ball pitched outside leg stump.
Earlier, resuming from 15-0 overnight, Hafeez showed urgency for quick runs by playing some attractive pull shots and drives through the covers.
Hafeez, who made 96 in Pakistan's first innings of 566-3 declared, welcomed Sodhi with successive boundaries through the covers. He raised his half century off 89 balls by pulling the legspinner to midwicket for his eighth four.
Hafeez required only 41 more deliveries to complete his first hundred since scoring a century against Sri Lanka in 2012. He drove McCullum through the covers and ran for two before captain Misbah-ul-Haq declared.
Hafeez seemed to be troubled by cramps soon after completing his half century, and received on-field treatment from the team physiotherapist.
He recovered to hoist fast bowler Tim Southee over long-on for a six, and Sodhi was also lofted over the mid-on fence soon after the lunch break, to reach 97.
Legspinner Sodhi took both wickets when he had Younis Khan (28) and Azhar Ali (23) leg before wicket to finish with 2-66.