Azhar Ali's third half-century of the series put Pakistan in the driver's seat at 139-3 in reply to New Zealand's 274 on day two of the deciding third test overnight.
Fast bowler Trent Boult dismissed the openers to reduce Pakistan to 17-2, then Azhar led Pakistan's recovery with an unbeaten 62 off 169 balls.
Azhar featured in a 68-run stand with Haris Sohail (34), then added an unbroken 54 with Asad Shafiq, 26 not out off 85 balls.
New Zealand squeezed Pakistan's scoring in the last session through its seamers and spinners. Pakistan didn't hit a boundary for 29 overs until more than halfway through the last session.
But Azhar showed lots of skills as Pakistan conceded to the visitors only the wicket of Sohail. The left-hander was caught behind while attempting a cut shot against Tim Southee.
Shafiq also was patient on the slow pitch, and didn't open up until late in the day with four boundaries off Boult and Ajaz Patel.
Boult took 2-39 from 14 overs. Offspinner William Somerville, on debut, has allowed 16 runs off 12 overs with five maidens.
But none have managed yet to handle Azhar, who scored 65 in the first test at the same venue last month before New Zealand pulled off a sensational four-run win. He also scored a half-century in Pakistan's resounding innings win at Dubai.
Earlier, BJ Watling's gritty unbeaten 77 off 250 balls lifted New Zealand's total to 274 before offspinner Bilal Asif wrapped up the innings just before lunch. Asif's 5-65 was the offspinner's second five-wicket haul in five tests.
Resuming the day on 229-7, Somerville didn't add to his overnight 12 but denied Pakistan a breakthrough with his staunch defense for well over an hour.
Watling showed some aggression against the fast bowlers and completed his half-century off 199 balls by guiding Hasan Ali to the third man boundary.
Watling, 42 overnight, also reached 3,000 test runs when he made 66, with only four boundaries, in a determined knock of more than 5 1/2 hours.
Asif extracted sharp bounce and turn off the pitch and finally got through Somerville's defenses when he clean-bowled the No. 9 batsman.
Asif claimed the last two wickets in successive overs when Patel (6) was caught in the slips and Boult (1) was clean-bowled while attempting an ambitious shot.
Legspinner Yasir Shah didn't add to his three-wicket burst before lunch on day one and still needs two wickets to become the quickest bowler to complete 200 test wickets.
Boult provided New Zealand early success when the out-of-form Hafeez edged low to Tim Southee at second slip before Pakistan scored.
Boult returned after the break and had Imam caught by Southee in the slips on 9.
Azhar then dug in well by combining in two half-century stands with Sohail and Shafiq to give Pakistan's innings stability.