Former captain Angelo Mathews continued his role as saviour on Sri Lanka's tour of New Zealand as he and Kusal Mendis struck unbeaten hundreds to thwart the host's push for victory on the fourth day of the first Test at the Basin Reserve.
Mathews was on 117, while Mendis was 116 not out as they took their side to 3-259 at stumps, having batted together all day and created Sri Lanka's highest partnership for any wicket against New Zealand with a marathon 246-run stand.
It was the first time in Test cricket that a full day's play had been completed without a wicket falling since the first day of the second match between South Africa and Bangladesh on February 29, 2008.
The pair's stubborn resistance could prove to be match-saving with rain forecast for the final day on Wednesday.
They had resumed at 3-20, needing another 276 runs to even make New Zealand bat again, after Tom Latham's maiden double century of 264 not out had powered the hosts to a massive first innings total of 578.
They frustrated New Zealand's bowlers, who resorted to a short-pitched attack early on, changed to a fuller length towards lunch, then virtually shut down the scoring during the middle session with Ajaz Patel shoring up one end.
Nothing, however, worked against Mendis and Mathews, who were untroubled on a pitch offering little in the way of sideways seam movement, although left-arm spinner Patel got the occasional delivery to bite and bounce.
It was the third successive innings in New Zealand that Mathews has resurrected his side's fortunes when staring at embarrassment.
The 31-year-old top-scored with 83 in Sri Lanka's first innings of 282 and combined with Dimuth Karunaratne for a 133-run partnership after they slumped to 3-9 inside the first four overs.