New Zealand are in a strong position following day two of the opening Test after Kane Williamson's century guided the hosts to an imposing first-innings total against Pakistan.

Williamson chalked up his 23rd Test hundred, the Black Caps captain's 129 leading New Zealand to 431 all out at Bay Oval in Mount Maunganui on Sunday.

In response, Pakistan lost an early wicket – opener Shan Masood (10) dismissed by Kyle Jamieson (1-5) – before reaching 30-1 at stumps.

Abid Ali (19 not out) and nightwatchman Mohammad Abbas (0 not out) will return to the crease, with Pakistan still trailing by 401 runs.

New Zealand resumed on 222-3 on the second day of the first contest – Williamson making his way back out to the middle unbeaten on 94.

It was only a matter of time before Williamson raised his bat to celebrate back-to-back Test tons, having reached triple figures against West Indies, after Henry Nicholls posted a half-century from 108 deliveries.

A pair of wickets fell prior to lunch, Nicholls (56) and Williamson, as the pair's 133-run stand was eventually snapped – Naseem Shah (1-96) broke the partnership with the first ball after drinks and Williamson followed four deliveries later after edging Yasir Shah (3-113) to Haris Sohail.

New Zealand were 281-5 when Williamson departed, but BJ Watling guided the Black Caps past the 400-run mark as he recorded his fifty prior to the tea break.

Watling reached 73 in the final session before becoming Shaheen Afridi's fourth victim (4-109), while Jamieson (32), Mitchell Santner and Neil Wagner (both 19) made contributions as Tim Southee (0) fell cheaply.