The tourists lost six wickets in the final session at Hagley Oval to be 129-7 at stumps, ahead by only 62 runs with two days remaining.
Boult had three for 18 off 15 overs while Wagner, who started the wicket spree, had two for 21.
Not out for Pakistan were Sohail Khan on 22 and Asad Shafiq on six with the Test likely to be all over in three playing days after the scheduled first day was washed out.
They ripped out the last seven New Zealand wickets for only 96 runs and Azhar Ali and Babar Azam were painstakingly building their second innings -- accumulating 37 runs in 23 overs.
Also Read
But, in the sixth over after tea Azam on 29 attempted to fend away a Wagner ball targeting his ribs only for it to skim the gloves and wicketkeeper BJ Watling completed the dismissal.
It gave Wagner his 100th scalp in his 26th Test, making him the second-fastest New Zealander to claim a century of wickets after Richard Hadlee reached the mark in 25 matches.
Captain Misbah-ul-Haq tried to knock Tim Southee out of the attack with a four and two off successive balls but he pulled the next delivery to Boult running around the long-leg boundary and he was gone for 13.
An inspired Boult then bowled Azhar to end the opener's marathon innings in which he faced 173 balls in more than four hours for only 31 runs.
Boult, on a roll, bowled Sarfraz Ahmed for two and had Mohammad Amir caught for six.
Colin de Grandhomme, whose first innings 6-41 was the best bowling performance by a New Zealander on debut, made the opening breakthrough in Pakistan's second innings when he had Sami Aslam, who faced 57 deliveries, out for seven.
After New Zealand resumed the day in a commanding position at 104-3, some impetuous shot-making saw them all out for 200 as they tried to hurry the score along under cloudy skies and a pitch that suited seam bowlers.
De Grandhomme, who has rarely been out of the spotlight in his maiden Test, belted a quickfire 29 that included six boundaries while Southee (22) and Wagner (21) also plundered quick runs in their brief cameos.
The New Zealand innings folded in 55.5 overs, just four more than Pakistan's first innings of 133.
Rahat Ali was the chief destroyer for Pakistan with four for 62 while Sohail Khan and Mohammad Amir took three wickets each.
Disclaimer: No Business Standard Journalist was involved in creation of this content