Contrasting half-centuries from BJ Watling and Colin de Grandhomme helped New Zealand lead by 138 runs in their first innings against Sri Lanka on day four of the rain-hit second Test on Sunday.
De Grandhomme, scoring 83 off 75 balls, and Watling, on 81, put together an unbeaten 113-run stand for the sixth wicket to frustrate the Sri Lankan bowling at Colombo's P. Sara Oval.
Overnight centurion Tom Latham made 154 during a key 143-run partnership with Watling after the first session was washed out due to rain and wet outfield.
Only 48 overs were possible of the scheduled 98 on the fourth day as New Zealand reached 382 for five at stumps. The tourists resumed the day on 196-4.
Off-spinner Dilruwan Perera broke the marathon stand after trapping Latham leg before on a delivery that pitched and hurried on to the batsman's pad.
Latham, who started the day on 111, registered his fifth 150 plus score in Tests. His career-best 264 not out also came against Sri Lanka in Wellington last year.
De Grandhomme counter-attacked after Latham's departure, hitting the home bowlers to all parts of the ground, smashing five fours and five sixes.
Watling, who completed his 18th Test fifty, then stood guard with De Grandhomme to take the team to tea at 295-5.
The two batsmen kept the Sri Lankan attack at bay in the final session as Watling played the sheet anchor role to perfection, while allowing De Grandhomme to take charge.
Watling, who started the day on 25, has played a patient knock during his 208-ball stay.
Sri Lanka are without the services of wicketkeeper Niroshan Dickwella and captain and opening batsman Dimuth Karunaratne, who strained a muscle of his left leg and will be unable to bat until the fall of the fifth wicket.
Angelo Mathews is the stand-in-captain and substitute Dinesh Chandimal is keeping wicket in the absence of Dickwella, who sustained a cut on the little finger of his left-hand on day three.
Sri Lanka, who lead the two-match series 1-0, made 244 after electing to bat first in a match that has witnessed numerous rain interruptions.
The Kane Williamson-led New Zealand will be looking to bat only once and then let their pace duo of Tim Southee and Trent Boult have a crack at the Sri Lankan batsmen in a bid to square the series.
Play will get underway at 9:45 am (0415 GMT) Monday, the final day of the match, weather permitting.
Sri Lanka have lost five of their last seven Test matches at The Oval.