Leg-spinner Yasir Shah shined through once more by claiming six wickets in the Kiwis' second innings. In the first innings, he had picked up eight wickets, causing New Zealand to crumble at 90 runs. Yasir finished with a total of 14 wickets in the match
Hasan Ali picked up three, while Bilal Asif claimed one wicket.
Resuming on 131-2 after being forced to follow-on, New Zealand were trailing by 288 runs on the fourth day of the second Test.
Yasir (2-111) bowled 16 wicketless overs in the morning session, while fast bowler Hasan Ali (1-15) and Bilal Asif (1-47) who were among the wickets.
Shah took 10 wickets on the third day that included career-best 8-41 to dismiss New Zealand for just 90 in the first innings.
But the leg-spinner bowled either too full or too short to challenge New Zealand in the first session on Tuesday.
Hasan provided the breakthrough when Latham (50) was contentiously adjudged caught behind soon after completing his half century.
On-field umpire Paul Reiffel thought Latham had edged Hasan and went to third umpire Ian Gould to confirm through television replays.
Spikes did appear on replay technology as the ball passed the bat when Latham played a defensive shot close to his front pad.
However, the batsman walked off the field in disbelief.
This ended an 80-run third-wicket stand between Taylor and Latham, who hit four boundaries in his 158-ball knock.
Two balls later Nicholls successfully reviewed an lbw decision against him as TV replays showed Hasan's delivery would have missed the leg stump.
Taylor (82) completed his half century off 54 balls when he drove Hasan through the point boundary off the first ball of the day.
But Taylor went on the defence for a while before he played a reckless sweep, half an hour before lunch, and top edged off-spinner Asif to deep backward square leg.
Taylor's half century featured seven fours and a six and came off 128 balls.
New Zealand leads the series 1-0 after narrowly winning the first Test by four runs.