Dubai - Pakistan were under pressure after losing both their openers for 34 in reply to New Zealand's big total of 403 in the second Test in Dubai on Tuesday.
Azhar Ali (four) and Younis Khan (one) were unbeaten at close on the second day after Shan Masood (13) and Taufeeq Umar (16) departed early to give New Zealand an edge for the first time in the series.
Pakistan still need 170 runs more to avoid the follow-on with eight wickets intact.
Pakistan's new opening pair, after Ahmed Shehzad and Mohammad Hafeez were ruled out due to injuries, flopped as Masood played over a sharp turning delivery from Ish Sodhi and was bowled between the gap.
Umar, playing his first Test in two years, was stumped as he was beaten by off-spinner Mark Craig.
That capped a good day for New Zealand who added 160 runs in the day.
Besides opener Tom Latham's brilliant 137, New Zealand owed their total to tail-enders who added 125 runs for the last four wickets after they had seemingly squandered a chance to post a big total at 278-6.
Mark Craig (43), BJ Watling (39) and Ish Sodhi (32 not out) fought hard to ensure New Zealand get past the 400-mark, a total which could put an in-form Pakistan batting under pressure.
Watling said New Zealand had the better of Pakistan on the day.
"Obviously after losing two early wickets we had to try and put up a decent total and we managed that and then their two wickets made a good day for us," said Watling.
Left-arm spinner Zulfiqar Babar was the pick of bowlers with 4-137 while leggie Yasir Shah finished with 2-92 and seamer Ehsan Adil 2-73.
Watling and Craig added 68 for the seventh wicket in the post-lunch session to leave the Pakistani bowlers frustrated on an unresponsive pitch.
It was left to part-timer Azhar Ali to break the stand when he had Watling caught in the slips and then two runs later Babar trapped Craig leg-before to leave New Zealand at 348-8.
Craig hit five boundaries in his 110-ball knock while Watling had three hits to the fence in his two-hour stay.
Sodhi and Tim Southee (17) added a further 39 for the ninth wicket and Sodhi lofted Babar for a six to post the 400.
Babar though had the last laugh, dismissing number eleven Trent Boult to wrap up the innings.
Earlier, resuming on a strong 243-3, New Zealand lost both their overnight batsmen Corey Anderson and Tom Latham in the space of two runs in the first three overs of the day.
Adil had Anderson (nine) caught in the covers before fellow new-ball partner Rahat had Latham caught behind.
Latham, who scored 103 in New Zealand's 248-run defeat in the first Test in Abu Dhabi, fell in the next over as he edged a ball from Rahat to wicket-keeper Sarfraz Ahmed.
Latham failed to add to his overnight score of 137. He batted for 394 minutes and hit 11 fours and a six.
Neesham added 33 for the sixth wicket with Watling before he miscued a drive off Shah and was caught at short mid-wicket by Misbah-ul Haq for 17.
The third and final Test will be played in Sharjah from November 26.