Azhar Ali and Asad Shafiq hit centuries to leave Pakistan in command of the third and final Test against New Zealand in Abu Dhabi despite a batting collapse that curtailed their first-innings lead.
Azhar hit an attractive 134 for his 15th Test hundred while Shafiq scored 104, but debutant New Zealand off-spinner Will Somerville took four wickets to restrict Pakistan to 348 all out.
Pakistan appeared set to build a huge lead before collapsing from 286-3 to lose their final seven wickets for the addition of just 62 runs.
34-year-old Somerville finished with 4-75.
New Zealand were then reduced to 26-2 at stumps with Kane Williamson unbeaten on 14 and nightwatchman Somerville on one not out.
SCORES IN BRIEF
NEW ZEALAND: First innings 274
PAKISTAN: First innings 348 all out (Azhar 134, Shafiq 104; Boult 2-66, Somerville 4-75)
NEW ZEALAND: Second innings 26 for 2.