The Blackcaps' equation for a maiden series win over South Africa is simple heading into day five of the second test - bat 90 overs in the hope of saving a draw, or score an improbable 332 runs for victory.
South Africa meanwhile require just six wickets to secure a victory of their own, and level the series at 1-1 to deny New Zealand history.
Chasing a world-record 426 runs for victory, the Blackcaps reached stumps on day four at Christchurch's Hagley Oval at 94/4, batting out 42 overs so far.
New Zealand's hopes will rest on Devon Conway, not out with 60 at stumps, who will be joined by wicketkeeper Tom Blundell on the fifth and final morning.
South Africa were led brilliantly with the bat by wicketkeeper Kyle Verreynne, who scored his maiden test century, before the pair of Kagiso Rabada (2/17) and Keshav Maharaj (2/32) shared in the New Zealand wickets.
Rabada in particular did all he could to firm for the man-of-the-match award, scoring a rapid 47 from 34 balls, to go with his first-innings bowling performance of 5/60 to bowl the Blackcaps out for 293.
Resuming with a lead of 211 runs, South Africa's sixth-wicket pair of Verreynne and Wiaan Mulder batted on into the morning session, and added a 50-run stand together in 131 balls.
Verreynne passed 50 for the first time in test cricket, taking 97 balls with five boundaries, before Mulder fell for 35 - out to a stunning catch from Blundell off the bowling of Kyle Jamieson at 192/6, 261 runs ahead.
And if Blundell's catch to remove Mulder was stunning, Will Young's effort to dismiss Marco Jansen was nothing short of spectacular. A flick out to the deep midwicket boundary saw Young dive full stretch, taking a stunner with his left-hand running backwards to see Jansen depart for nine off the bowling of Colin de Grandhomme.
A Rabada edge through gully took South Africa's lead over 300 runs, as the Proteas reached lunch at 232/7.
But after lunch, South Africa took complete control of the test as Rabada took the attack to the Blackcaps.
South Africa's No.9 launched a boundary-laden blitz, hitting four fours and four sixes on his way to a 34-ball 47, adding 78 runs in partnership with Verreynne.
Rabada fell trying to reach his maiden test half-century with a six, caught by de Grandhomme off Henry, but the damage was done as South Africa's lead had passed 350 runs.
And with no pressure on the scoring, Verreynne pressed on to reach his maiden test-century, taking 158 balls. Verreynne finished unbeaten, as South Africa declared at 354/9 at tea to set the Blackcaps 426 runs to win in four sessions.
Chasing a world record target, the Blackcaps innings was very quickly on the back foot, as Rabada removed both openers before New Zealand had even reached double figures.
Young was caught at gully by Temba Bavuma for a duck, before Latham was held by Rassie van der Dussen at short leg, as the Blackcaps were reduced to 6/2.
Henry Nicholls managed to play out Rabada's opening burst with no issues, but fell in the first over of spin when Maharaj was introduced. The left-hander played around a ball turning back into him, and lost his middle stump for seven.
But Mitchell didn't allow Maharaj to settle, and launched the spinner for back-to-back sixes in the 14th over, with no signs of excessive turn in the day four Hagley Oval pitch.
Mitchell and Conway batted out 144 deliveries together for the fourth wicket, adding 56 runs to the New Zealand total.
But Mitchell's 72-ball vigil ended before stumps, as Maharaj managed to spin the ball past the outside edge of the bat, clipping off-stump to send him on his way for 24.
Conway pressed on to pass 50 for the third time in test cricket, taking 106 balls with seven boundaries, and shouldering New Zealand's hopes of a series win.
At the other end, Blundell batted out 17 balls to end the fourth day, only getting off the mark to the final delivery, and will resume on Tuesday alongside Conway.
Test cricket's highest successful run chase at present is 418 runs, achieved by the West Indies against Australia in 2003.
South Africa 364 (Erwee 108; Wagner 4/102) & 354/9d (Verreynne 136 not out; Wagner, Jamieson, Henry 2/81)
New Zealand 293 (de Grandhomme 120 not out; Rabada 5/60) & 94/4 (Conway 60 not out; Rabada 2/17)
Join Newshub for live updates of the Blackcaps v South Africa from 11am Tuesday.