Tim Southee (nine) and Ish Sodhi (12) were at the crease as New Zealand added 126 runs in the two sessions after resuming at 243-3.
Tom Latham fell on his overnight score of 137, Corey Anderson for nine and Jimmy Neesham for 23.
BJ Watling scored 39.
For Pakistan Ehsan Adil, Yasir Shah and Zulfiqar Babar took two wickets apiece.
Pakistan lead the three-match series 1-0 after winning the first Test by 248 runs in Abu Dhabi.