New Zealand reached 272-4 at stumps on Day 4 to swing the deciding Test against Pakistan in their favour.
Captain Kane Williamson cracked an unbeaten century as New Zealand took a valuable 198-run lead against Pakistan on day four of the third and final Test in Abu Dhabi on Thursday.
Williamson was not out on 139 off 282 balls having batted through the day, with middle-order batsman Henry Nicholls keeping him company on 90 as New Zealand reached 272-4 at stumps to swing the deciding Test in their favour.
The teams are tied 1-1 in the three-match series.
Resuming on their overnight score of 26-2, New Zealand lost nightwatchman William Somerville in the seventh over of the morning as the debutant was trapped in front of the wicket by leg-spinner Yasir Shah.
Shah's fifth wicket of the contest in his 33rd Test saw him replace Australian Clarrie Grimmett as the fastest man to claim 200 Test victims.
Grimmett, also a leg-spinner, had reached the 200 mark in his 36th Test against South Africa 82 years ago.
Pace bowler Shaheen Shah Afridi then had Ross Taylor caught at square leg as the veteran batsman looked to pull one away, but that was as much joy as Pakistan would have on a Sheikh Zayed Stadium track that has steadily improved for batting.
After coming together at 60-4, Williamson and Nicholls rode their luck to put on an unbroken 212-run stand for the fifth wicket.
Shah in particular was guilty of poor fielding, dropping Williamson on 80 and 106, while Imam-ul-Haq missed a sharp catch after left-hander Nicholls reached his fifty.
Pakistan tightened up to lower the scoring rate but could not stop Williamson from completing his 19th Test century and Nicholls from inching closer to his third.
New Zealand won the opening Test in Abu Dhabi by four runs before Pakistan squared the three-match series with victory in the second Test in Dubai by an innings and 16 runs.