Thilan Samaraweera claimed a half-century to stabilise Sri Lanka's shaky innings and give them a chance of victory in the second Test in Colombo.
Samaraweera hands Sri Lanka Test lifeline against New Zealand
Having started the day on a precarious 43 for three, a solid 90-run partnership between Angelo Mathews (47) and Tharanga Paranavitana (40) got the home side going before the pair were dismissed late in the morning session.
Samaraweera then continued the fightback in the final two sessions thanks to his unbeaten 97-run seventh-wicket stand with Suraj Randiv.
The 36-year-old was 76 not out when bad light brought an early end to proceedings with Sri Lanka on 225 for six - 187 runs of their first-innings target of 412.
New Zealand had gained the upper hand on day two by going past the 400-run mark and then reducing their opponents to 12 for three at one point.
Mathews and Paranavitana managed to steer Sri Lanka through to the close, and the pair resumed this morning as the hosts looked to mount a challenge.
Paranavitana struck three fours on his way to 40 but then edged a Tim Southee delivery to Kruger van Wyk behind the stumps.
Mathews followed his teammate just two overs later, Southee snaring his fourth victim with a teasing delivery which was steered to Martin Guptill at second slip.
Mathews' knock of 47 had at least been an entertaining one for the crowd, with five boundaries and a six.
Prasanna Jayawardene and Samaraweera saw the home side through to lunch on 107 for five, but the former could only see out a few overs of the afternoon session before he fell on 12 to Jeetan Patel, Kane Williamson taking the catch at square leg.
Samaraweera kept his head, though, and with the help of Randiv, the pair soon became a source of frustration for New Zealand's bowlers.
Samaraweera was two short of his fifty by tea and knocked off the runs needed in the first over after the interval, passing the mark off 114 balls with three fours.
Randiv had to be more patient in his search for runs but still managed two boundaries as Sri Lanka threatened a more respectable total than had seemed possible at one stage.
Samaraweera had taken his score to 76 at stumps with Randiv unbeaten on 34, and hopes will rest on the pair again tomorrow as Sri Lanka look to rescue a result.
Follow us @SprtNationalUAE