Ross Taylor played something of a lone hand to defy Pakistan as New Zealand struggled in their second innings on the fourth day of the second Test in Dubai.
Taylor (77 not out) survived the Pakistan attack as Zulfiqar Babar and Yasir Shah claimed three wickets apiece, leaving the tourists 167-6 at stumps, with a lead of 177 runs.
Earlier, Sarfraz Ahmed was in inspiring form for the hosts with a knock of 112 as Pakistan were bowled out for a respectable 393.
Resuming on 281-6, and still 122 runs adrift, Pakistan lost Shah in the third over of the day as his decision to leave Tim Southee's delivery came too late and he edged behind to wicketkeeper BJ Watling for two.
Shah's wicket began a Pakistan collapse as his replacement Ehsan Adil fell for nought two overs later, trapped lbw by Southee as Ahmed found himself with another new partner as he continued to add to his overnight 28.
He reached his half-century off 70 balls, including seven fours, just an over before Pakistan lost Babar for five, caught behind by Watling off Trent Boult to leave the hosts 312-9.
Ahmed continued to go for his shots and brought up his ton off 153 balls - with 15 fours - as he forged a strong partnership with Rahat Ali.
But the 27-year-old wicketkeeper finally fell to Brendon McCullum for 112, two overs after lunch, as he offered a return catch to end an impressive 10th-wicket partnership of 81, leaving his side 10 runs adrift.
New Zealand struggled to gather momentum as they began their second innings with 50 overs remaining in the day.
Tom Latham, who had impressed with his second century in successive Tests on Monday, failed to back that up as he fell for just nine runs in the 11th over - following a review - when he was caught at leg gully by Asad Shafiq off Shah.
McCullum and new partner Kane Williamson (11) were unable to steady the ship as the latter lost his wicket just 19 runs later, caught by Taufeeq Umar at cover to become Babar's first victim.
The wickets continued to tumble for New Zealand as Babar snared McCullum (45) lbw after a successful appeal and Corey Anderson (nought) followed soon after, bowled by Shah to leave the Black Caps 79-4.
Taylor kept the scoreboard ticking and put on a fifth-wicket partnership of 46 with James Neesham (11) before Babar struck again, dispatching the latter, before Taylor reached his half-century soon after off 63 balls.
Watling (11) survived an appeal but was caught six overs later by Shafiq at second slip off Shah as Pakistan claimed his late wicket, before Taylor and Mark Craig (0 not out) saw the tourists to the close.