Dunedin - Tim Southee took two wickets as New Zealand tightened the screws on Sri Lanka on the fourth day of the first Test Sunday, but rain threatened to derail their victory hopes.
New Zealand captain Brendon McCullum set the stage for a tantalising conclusion at Dunedin's University Oval with a sporting declaration that offered Sri Lanka more than five sessions to reach a 405-run target.
But the tourists' response was disrupted by three stoppages as southerly squalls swept across the ground. Further showers are forecast for the final day.
At stumps on day four, with an hour's play lost because of the weather, Sri Lanka were 109 for three, requiring a further 296 runs to pull off an epic victory.
Dinesh Chandimal is not out 31 and captain Angelo Mathews has yet to face.
Sri Lanka's highest fourth-innings chase is 352-9 against South Africa in 2006 and the highest by any side in New Zealand is 348-5 by the West Indies in 1969.
McCullum declared New Zealand's second innings at 267-3 to go with their 137-run first innings advantage.
Sri Lankan openers Dimuth Karunaratne and Kusal Mendis set about building a foundation reaching 54 in the 27th over when New Zealand struck twice.
Southee had Karunaratne, Sri Lanka's top scorer in the first innings, caught behind for 29 and 10 runs later debutant Udara Jayasundera fell to Neil Wagner for 3.
Mendis, in only his second Test, persevered for 150 deliveries and benefited from dropped catches on 13 and 25 before he was caught behind off Southee for 46 with the score on 109.
Before his replacement Mathews could reach the crease a hail storm brought play to a halt for the third and final time.
The dismissal of Mendis gave wicketkeeper BJ Watling a New Zealand record ninth catch for the Test.
With seven wickets left he has a chance to reach the world record of 11 jointly held by England's Jack Russell and South African AB de Villiers.
After New Zealand resumed the day at 171-1, McCullum called an end to the innings after he belted his second six to equal the world record for the number of sixes hit in Tests.
It took his total to 100, joining Australia's Adam Gilchrist as the most prolific boundary busters in Test history.
McCullum was 17 not out when he declared, with the 23-year-old opener Tom Latham unbeaten on 109, having notched up his third Test century.
Kane Williamson, who reached his half century with the second ball of the morning, was out for 71.
It was the 20th time he has passed 50 in all forms of international cricket this year including eight times in Tests.
Latham offered two chances which were not taken and had a nerve-wracking wait on 99 when Sri Lanka challenged a rejected lbw appeal.
Several replays proved inconclusive and the Sri Lankans were helped by the ball-tracker technology not working.