Sharjah, United Arab Emirates: Captain Brendon McCullum's belligerent record-breaking century put New Zealand on top in the third test after offspinner Mark Craig's career-best 7-94 finished off Pakistan for 351 on Friday.
McCullum smashed New Zealand's fastest ever test hundred off 78 balls, and he and Kane Williamson combined for the Kiwis' biggest second-wicket stand against Pakistan in reaching 249-1 at stumps on the second day to trail by 102 runs.
The skipper was unbeaten on 153 off 145 balls, hitting 17 fours and eight sixes, in a 198-run stand with Williamson, who will resume on 76.
Earlier, Pakistan resumed the day on 281-3 and lost its last seven wickets for just 70 runs in the first session, with Craig claiming the last five.
Play was abandoned on Thursday after the death of Australia batsman Phillip Hughes, and the match was extended by a day.
Pakistan stemmed the flow of runs after tea through offspinner Mohammad Hafeez, limiting New Zealand to 85 runs in 20 overs.
But in the second session, McCullum pulverized the bowlers as the Black Caps racked up 164 runs in 25 overs for the loss of Tom Latham for 13.
McCullum punished fast bowler Mohammad Talha (7-0-62-0), and spinners Zulfiqar Babar and Yasir Shah conceded 130 runs in 20 overs on the flat pitch.
McCullum missed Tim Southee's New Zealand record of fastest test half century by just one ball, when he raced to 50 off 30 deliveries by smashing fast bowler Rahat Ali for two successive boundaries.
He took four boundaries in Talha's penultimate over before tea, and turned Babar around the wicket off the last ball before the interval to complete a magnificent 10th test century, and his first against Pakistan.
Ross Taylor held the previous New Zealand record of an 81-ball hundred, against Australia at Hamilton in 2010.
McCullum's blitz overshadowed Williamson's knock, as the right-hander scored his first half century of the series and hit seven fours and six.
Earlier, Hafeez resumed at 178, but missed out on a maiden double century, and was out for 197 before Craig quickly wrapped up the innings in an extended 2 1/2-hour first session due to Friday prayers.
There were no celebrations from New Zealand players because of Hughes' passing, despite Pakistan losing wickets in quick succession at Sharjah Cricket Stadium.
The teams and officials wore black armbands and lined up to observe a minute of silence before play. As another mark of respect, both teams put their caps on the handles of their bats and placed them along the fence near the field entrance. The New Zealanders also penned the initials PH on their shirts below the Silver Fern.
Neither Southee nor Trent Boult bowled a short delivery with Hughes' death from a bouncer still fresh. The players were visibly somber, and even McCullum was subdued when he reached his 100, with barely an acknowledgement to his applauding team, and a hug from Williamson.
Captain Misbah-ul-Haq couldn't add to his overnight 38 before he drove at a wide Southee delivery, and was caught behind in the fourth over of the day.
Hafeez dominated the bowlers on the first day with his crisp cuts, pulls and drives, and on the verge of reaching 200 on Friday he pulled legspinner Sodhi and was out at deep midwicket off a top edge.
Hafeez faced 316 balls, hitting 25 fours and three sixes in just over seven hours of flawless batting, but his departure at 311-5 ignited the collapse, as Craig claimed all of the remaining five wickets.
Taylor became the second New Zealander to achieve 100 catches, after former captain Stephen Fleming, when Rahat Ali edged Craig in the slips. Taylor added one more to his tally by having last man Yasir Shah caught at the same position for 25.