New Zealand took a 1-0 lead in their series against Sri Lanka after recording an eight-wicket victory in the first Test at Christchurch.
The Kiwis bowled the tourists out for 407 in the morning session, leaving them a target of 104 runs to secure the win.
The home side's chase got off to a poor start when Tom Latham was dismissed for 17 as he was caught by Angelo Mathews off the bowling of Tharindu Kaushal.
Hamish Rutherford then departed for just 10 runs as he fell to the bowling of Shaminda Eranga to leave his side 43-2.
However, Kane Williamson and Ross Taylor steadied the innings and calmly guided the Kiwis to their total in a composed manner. Taylor hit the winning runs as he struck Dhammika Prasad for two boundaries to seal the eight-wicket victory.