Kane Williamson and Henry Nicholls posted unbeaten centuries in Wellington on Saturday to boost New Zealand's chances of winning the second Test against Sri Lanka played.

The in-form Williamson was at the crease on 189 while Nicholls emerged from a run of low scores to hit 130 as the Black Caps reached an imposing 443-2 at tea on the second day.

Their third-wicket partnership climbed to 325 -- the seventh highest by any New Zealand pair -- while the visitors struggled to make inroads in a match they must win to square the two-Test series.

Sri Lanka created only one clear chance as New Zealand advanced from 155-2 overnight, failing to find any venom in a flat Basin Reserve pitch.

Williamson was impenetrable as he posted his third century in successive Tests, becoming the first New Zealander to pass 8,000 runs in the process.

The 32-year-old also reached three figures in his side's dramatic first Test win in Christchurch earlier in the week and did the same in New Zealand's one-run defeat of England in Wellington, which squared that two-match series.

He was closing in on a fifth double-century, having accelerated on day two after resuming on 26.

Williamson struck 20 fours and his two sixes were hooked off consecutive deliveries from seamer Lahiru Kumara midway through the first session.

Nicholls also batted crisply, marching from his overnight 18 to notch a ninth century and end a bleak run of form -- having failed to reach 40 in his 15 previous innings.

The left-hander survived the only clear chance of the day, on 92 when offspinner Prabath Jayasuriya dropped a relatively simple drive hit straight back to him.

Nicholls ended the second session with a flourish, hoisting Asitha Fernando for pull shots from the final three deliveries, resulting in two sixes and a four.

Sri Lanka seamer Kasun Rajitha didn't bowl after suffering an injury to his left shoulder while fielding early in the second session, although he did later return to the field of play.