Williamson scored 238 and collaborated in a marathon 369-run partnership, a New Zealand record for the fourth wicket, with Nicholls, who made 157.
New Zealand, having recovered from 71 for three in Christchurch, ended the day trailing Pakistan’s first innings 297 by just 11 runs with seven wickets in hand.
Williamson leaped from third to first after his player-of-the-match effort leading the Black Caps to a 101-run victory over Pakistan this week, scoring 129 in the first innings and a rapid 21 in the second when New Zealand were building a lead before declaring.
Both New Zealand and India were defeated by Pakistan, which has put their semi-final chances in peril. India and New Zealand are paired with Afghanistan, Namibia and Scotland along with Pakistan.
Pakistan, who have won all their three matches, are almost certain to play in the semis. The three other teams in the group are underdogs, two of them are not even Full Members.
Rashid shared a video from his Instagram account in which he, Williamson and Warner can be seen sitting at a restaurant, all three of them are about to break their fast.