Middle-order batsman Henry Nicholls stood firm with a fighting half century to delay Pakistan's probable series-levelling victory in the second day in Dubai on Tuesday.
Nicholls was unbeaten on 74 for his seventh Test fifty as New Zealand reached 297-7 at tea on the fourth day, needing another 31 runs to avoid an innings defeat with just three wickets intact.
Pakistan, who lost the first Test by four runs in Abu Dhabi, were put on the victory path by leg-spinner Yasir Shah who followed his career best 8-41 with 4-137 in the second innings.
But New Zealand's batsmen led by Ross Taylor (82) and Nicholls made Pakistan toil hard.
Nicholls added 52 for the fourth wicket with Taylor and another 57 for the next with BJ Watling who made 27.
Nicholls has so far smashed a six and seven boundaries.
Yasir finally broke Watling's resistance by trapping him leg before but could not dismiss all 11 players in the match when Colin de Grandhomme fell to Hasan Ali for 14.
Yasir bowled Ish Sodhi for four to register his best match figures of 12-178, improving on his 10-141 against England at Lord's in 2016.
Earlier, Taylor had resisted during his aggressive knock before becoming off-spinner Bilal Asif's first wicket in the match.
Taylor smashed seven boundaries and a six during his aggressive 128-ball knock and added a valuable 80 runs for the third wicket with Tom Latham who fell for 50.
New Zealand were forced to follow-on after superb bowling by Yasir, who dismissed them for a paltry 90 on Monday.
Resuming at 131-2 Taylor smashed medium pacer Hasan Ali's first ball of the day to cover boundary to reach his 29th half century in Tests.
Before this knock Taylor had managed just 21 runs in the three innings of this series.
Latham completed his 15th Test fifty with a single but was caught behind off Hasan after Paul Reiffel consulted television umpire Ian Gould for a fair catch. Latham hit four boundaries.