As they battled wind, rain and a fired-up New Zealand pace attack, Sri Lanka needed a record-breaking performance to win.
They were given a sporting chance by New Zealand skipper Brendon McCullum who declared with more than five sessions remaining.
However, after Dimuth Karunaratne and Kusal Mendis put on 54 for the first wicket their reply faltered on a wind- and rain-affected day.
Tim Southee and Neil Wagner struck in quick succession as Sri Lanka lost two wickets for 10 runs in six overs.
At tea, Mendis was on 32 with Dinesh Chandimal on five.
Karunaratne was out for 29, looking to cut a rising Southee delivery but succeeding only in edging it to BJ Watling behind the stumps.
It was a chance for Watling to make amends after dropping Mendis off Mitchell Santner five balls earlier.
Mendis had earlier been given a life when on 13 he nicked Doug Bracewell direct to second slip where Martin Guptill spilled the regulation chance.
Udara Jayasundera was caught behind off Wagner for three to give Watling his eighth dismissal so far in the Test.
New Zealand added a further 96 runs to their overnight 171-1 before McCullum declared at 267-3 after equalling the world record for the most career sixes.