Swing king Tim Southee snared his milestone 300th wicket as New Zealand sensed victory over Pakistan at stumps on day four of the first Test in Mount Maunganui on Tuesday.
New Zealand declared their second innings at 180 for five and Pakistan, set an unlikely target of 373, will go into the final day at 71 for three.
Azhar Ali will resume on 34 with Fawad Alam on 21.
The Black Caps need to sweep the two-Test series if they are to be in contention to make the World Test Championship final at Lords in June.
Although Pakistan are out of the running for the final they are keen to improve their world ranking of seven. But their cause was not helped when the wizardry of Southee and swing partner Trent Boult removed both openers for nought.
In New Zealand's second innings, the Pakistan quicks struggled to get any assistance from the fourth-day wicket, but Southee and Boult immediately had the ball dancing to their tune.
Abid Ali fended a rising Boult delivery and was caught behind, while Shan Masood was caught at first slip off Southee and Pakistan were two down for no runs after 14 deliveries.
Azhar Ali and Haris Sohail provided some resistance for 15 overs and 37 runs before Southee was back in action.
He broke the partnership with a full delivery to Sohail (9) which was chipped to Mitchell Santner at short cover - making Southee only the third New Zealander, after Richard Hadlee and Daniel Vettori, to take 300 Test wickets.
Southee has two for 15, and Boult one for 24. Neil Wagner, who was thought to have broken one toe while batting on Sunday, but has now been diagnosed with a second broken toe, sent down six overs to have none for four.
New Zealand began their second innings at the start of the day with Tom Latham and Tom Blundell putting on 98 in the first session.
Mohammad Abbas briefly troubled Latham, who sent three edges towards the slips, while a loud lbw appeal against Blundell was turned down with the TV umpire unable to distinguish whether the ball hit bat or pad first.
Otherwise the batsmen were untroubled, with Yasir Shah getting six overs but unable to produce any turn of note.
After lunch it was clear the declaration was approaching as New Zealand dropped their risk-free approach and wickets fell as the total rose.
Blundell was bowled for 64 when trying to slog Abbas over midwicket and New Zealand were 111 for 1.
Eleven overs later they were five for 170 as Pakistan bought wickets with a short-ball approach.
Latham, who had feasted on ones and twos and ran on misfields to keep the scoreboard ticking over, opened up with a textbook cover drive to the boundary to reach his 20th half-century.
He was dismissed soon after for 53 when he mistimed a pull shot and was caught in the deep.
Kane Williamson's attempted pull shot was top edged to wicketkeeper Mohammad Rizwan and he was gone for 21, while Henry Nicholls went for 11 when his pull shot was caught by Abbas at fine leg.
For Pakistan, Naseem Shah was the most effective bowler with three for 55.