New Zealand were on course to set a stiff target for Sri Lanka despite losing three wickets for one run off four balls on the penultimate day of the second and final Test on Wednesday.
The tourists slipped from 2-74 to 5-75 before skipper Ross Taylor (53 not out) and debutant Todd Astle (32 not out) took their team to 5-154 in their second innings at tea for an overall lead of 322 at the P Sara Oval in Colombo.
The pair added 79 for the unfinished sixth-wicket stand after Sri Lankan fast bowler Nuwan Kulasekara and left-arm spinner Rangana Herath struck in quick succession in the afternoon.
Kulasekara had Kane Williamson (18) caught by Tharanga Paranavitana in the slips and then trapped Daniel Flynn leg-before with the last two balls of his eighth over.
Herath then struck with the second delivery of the next over, having Kruger van Wyk caught by Paranavitana at leg-slip for a duck for his second victim of the innings.
Herath also had Brendon McCullum stumped by Prasanna Jayawardene after the batsman had cracked seven fours in a brisk 43-ball 35.
Martin Guptill (11) was first to be dismissed, caught by Tillakaratne Dilshan on second attempt at gully off paceman Shaminda Eranga.
Tim Southee earlier finished with 5-62 for his third five-wicket haul in a Test innings and left-arm paceman Trent Boult with 4-42 as Sri Lanka were bowled out for 244 in their first innings in reply to New Zealand's 412.