Kane Williamson scored 238, the fourth double-century of his career and his second of the summer, as New Zealand declared with a 362-run lead over Pakistan on the third day of the second cricket with 11 overs remaining in the day.
Williamson briefly delayed his declaration to allow allrounder Daryl Mitchell, son of former All Blacks rugby coach and current England assistant coach John Mitchell, to reach a maiden Test century.
Mitchell put on 133 with Williamson for New Zealand's sixth wicket. He was 69 not out when tea was taken late after a rain-affected second session and returned knowing he had only a handful of overs to reach his hundred.
He was 93 when he came to the fifth over which Williamson indicated was positively the last of the New Zealand innings. With a single, a pair of twos and a boundary, he reached his century from the fifth ball and was left 102 not out.
Pakistan openers Shan Masood and Abid Ali came to the crease at 6.30 p.m. in gloom lifted a little by Hagley Oval's new floodlights which were switched on for the first time just before 4 p.m. on a day of dark overcast and showers in Christchurch.
They had been in the field for 158.5 overs, almost two full days, and the task of facing New Zealand's fresh attack before stumps was a daunting one.
Masood fell for a duck in the eighth over and Pakistan went to stumps at 8-1, still 354 behind.
Williamson also had been a feature of almost all of the second and third days. He went to the crease in only the 20th over of New Zealand's innings early on the second day when it was 52-1 and he left 130 overs later when it was 585-6.
Unflappable, he was 199 when the second and shorter rain break of the day occurred Tuesday and returned to post his double century from 327 balls. In doing so he became only the second New Zealand after Brendon McCullum, his predecessor as captain, to post four double centuries in Tests.
And at 123 he surpassed 7,000 runs in Tests, following his current teammate Ross Taylor and former captain Stephen Fleming as one only New Zealanders to achieve that mark.
Williamson's partnership with Nicholls, which occupied 398 minutes or just under 90 overs, took New Zealand from 71-3 to 440-4 when Nicholls finally was out early in the second session. Nicholls, who resumed Tuesday at 89, batted for at least the second half of his innings with an injured calf which made his more than six and a half hour innings more notable.
The partnership at first was New Zealand's highest against Pakistan, then its highest for the fourth wicket against all nations. At its end it was the third-highest by a New Zealand pair for any wicket against any team.
That Williamson went on to form another century partnership with Mitchell before his dismissal underlined the relentless nature of his innings. Calmly, quietly he batted his team into a position of invulnerability.
Many fans on the banks of Hagley Oval wear sailor caps, now a popular accessory at Black Caps Tests, which bear the legend Steady the Ship, a tribute to Williamson's indefatigable performances. This season alone he has had innings of 251, 129 and 238 in three Tests — a record-breaking achievement by a New Zealander.
Williamson's latest innings came after his elevation to the No. 1 ranking among Test batsmen, announced as this Test began. Williamson accepted the accolade with typical diffidence, suggesting that none of his achievements match those of his predecessors atop the ranking list, India's Virat Kohli and Australia's Steve Smith.
"For me to sneak up, perhaps, in some way is very surprising and humbling," Williamson said. "But at the same time I think there's other rankings somewhere that quite clearly state the successes of these other two (Kohli and Smith).
"Year in and year out those two players, in all formats, are moving the game forward."
Any reasonable analysis would seem to support Williamson's elevation. The first Test against the West Indies this summer, in which he scored his career-best 251, was New Zealand's first in nine months.
He missed the second Test to be with his wife at the birth of his first child, then returned to make 129 in the first Test against Pakistan.
His latest innings, perhaps the best of his career, marked him as a player of extraordinary concentration and technique.
No home track hero, he also has centuries or better at Ahmedabad, Colombo, Bulawayo, Chittagong, Kingston, Jamaica, Sharjah, Lord's, and the Gabba and the WACA in Australia.