Pakistan were facing defeat in the third and final Test against New Zealand after they were restricted to 147-7 at tea on the fourth day in Sharjah on Sunday.
Seamer Trent Boult took the first three wickets while spinners Mark Craig and Ish Sodhi took two each as New Zealand eye a series-levelling win in the three-match series.
At the break Asad Shafiq (51) and Mohammad Talha (nought) were at the crease, with Pakistan still needing 192 to avoid an innings defeat.
Pakistan lead the series 1-0.
New Zealand piled up 690 in their first innings — their highest-ever Test total — to take a 339-run lead.
Pakistan had made 351 in their first knock.