New Zealand progressed to 154-5 and a 322-run lead against Sri Lanka at tea on the fourth day of the second test at P. Sara Oval on Wednesday.
New Zealand lost three wickets in the space of four deliveries soon after lunch, but an unbroken 79-run stand for the sixth wicket between captain Ross Taylor and debutant Todd Astle ensured the tourists retained control.
New Zealand is expected to declare soon with less than four sessions to bowl out Sri Lanka and square the series.
In the third over after lunch, after New Zealand resumed on 59-2, Nuwan Kulasekara dismissed Kane Williamson (18) and Daniel Flynn (0) in successive balls and two balls later Rangana Herath had wicketkeeper Kruger van Wyk (0) caught at leg slip as New Zealand slipped to 75-5.
Taylor stopped the slide, complementing his first-innings century with an unbeaten half century.
Earlier, Sri Lanka was bowled out for 244 after resuming on 225-6. Thilan Samaraweera was dismissed without any addition to his overnight score of 76 when a Trent Boult delivery squared him up and the outside edge flew to second slip where Martin Guptill took the catch.
Boult also dismissed Suraj Randiv, the other overnight batsman, after he completed a career-best 39. Boult finished with figures of 4-42 as three of the four wickets that fell in the morning went to him.
Tim Southee picked up the remaining wicket to finish with figures of 5-62, his third five-wicket haul in test cricket.