The best partnership of the test – aided by a slew of missed chances - has left the Black Caps needing a miraculous turnaround to claim a test victory against Sri Lanka in Galle.
They've pulled off a miracle on the subcontinent before – the last time they played a test series overseas, in fact. On that famous occasion, Pakistan were at 130-3, needing 176 for victory, before Ajaz Patel produced a stunning test-winning spell.
A New Zealand bowler is going to have to replicate such heroics if the Black Caps are to stand a chance on the final day. An unbroken opening stand of 133 between Dimuth Karunaratne and Lahiru Thirimanne put Sri Lanka in the box seat at stumps on day four, needing a further 135 to chase down 268 for victory.
It would be Sri Lanka's fifth highest fourth-innings chase, and the Black Caps would have themselves to blame for not capitalising on the chances presented to them.
BJ Watling missed a chance to stump Karunaratne and couldn't cling on to a bottom edge from the same batsman, while both openers had chances off Patel fall short or in and out of the grasp of Tom Latham at short leg.
Patel had his head in his hands, captain Kane Williamson's brow furrowed, and the Sri Lankan pairing made them pay. Karunaratne rode his luck to sit unbeaten on 71, while Thirimanne (57) reached his highest test score since 2015 as the duo produced Sri Lanka's highest ever fourth-innings opening partnership.
They continued what was a surprisingly good day for batting, with New Zealand's tail order shining to keep alive at least a slim chance of victory on day five.
Resuming day four at 195-7 with a lead of 177 and an initial goal of grafting a 200-run buffer, Watling and the tail exceeded expectations, with a fantastic lower-order fightback seeing the visitors reach 285 in their second innings.
Watling actually added the fewest runs of all contributors on day four, moving through to 77 before being caught behind off Lahiru Kumara, having added 46 for the eighth wicket with Will Somerville to push the lead over 200.
Somerville batted fantastically, finishing unbeaten on 40 – his highest first-class score. The lanky spinner has now faced 279 deliveries in his two tests, and grafted for 118 balls in this innings as he added 61 for the last two wickets with Trent Boult and Patel.
Boult blasted a typically quirky cameo, smacking 26 off 25 balls before finding the third man fielder trying to go for one unconventional shot too many, while Patel chipped in with 14, remarkably ensuring that Williamson was New Zealand's lowest scoring batsman in the test.
All up, 90 had been added on day four, and the last five wickets had contributed 187 – a superb and unlikely turnaround from 25-3 and 98-5 respectively. Sri Lanka were guilty of setting far too conservative fields late in the innings, as the Black Caps eventually hung in for 106 overs, theoretically providing their bowlers with more beneficial conditions later in the day.
However, the success of the New Zealand tail also indicated that there were fewer demons than expected in the Galle pitch, and so it proved as Sri Lanka produced what looks to be a test-winning partnership.