It was New Zealand's first away series win against Pakistan since their 1-0 win in Pakistan in 1969.
With the series tied at 1-1, the final day of this last Test promises to be fascinating with both sides capable of winning
Shah trapped New Zealand nightwatchman Will Somerville leg-before to reach the milestone in his 33rd Test
New Zealand were reduced to 26-2 at stumps with Kane Williamson unbeaten on 14 and night-watchman Somerville on one not out
Since his hundred on return, he has accumulated 66 runs in seven innings.
Azhar Ali was unbeaten on 62 at the close with Asad Shafiq on 26. Pakistan still trail by 135 runs with seven wickets intact
Williamson hit a fighting half century while wicketkeeper-batsman BJ Watling dug in to delay Yasir Shah's bid to become the fastest to 200 wickets
The 32-year-old needs just five wickets to shatter Australian leg-spinner Clarrie Grimmettt's 82-year-old record of completing 200 wickets in 36 Tests