The advantage has edged back towards Pakistan in the third cricket test against the Blackcaps in Abu Dhabi.
After resuming day two at 229/7, the New Zealanders fought through to a final first innings total of 274 on the back of BJ Watling's stoic undefeated 77.
Seamer Trent Boult struck twice in quick succession - his first in the second over of the innings - to have the hosts struggling at 17/2, both wickets secured with the aid of some sharp catching from Tim Southee.
Azhar Ali then stepped to the crease and tilted the test back in his side's favour with a patient 62 from 169 balls, his wicket still intact, as Pakistan closed the day on 139/3.
The Blackcaps attack toiled hard, but for little reward, with Southee capturing the wicket of Haris Sohail on 34 for the side's third and final wicket of the day.
Boult was the pick of the bunch, closing with figures of 2/39 from 14 overs.
Following his duck, Pakistan batsman Mohammad Hafeez later announced his retirement from test cricket. The 38-year-old opener will shift his focus to limited-overs internationals.