Kane Williamson scored his second Test century and guided New Zealand to an unexpected draw as the hosts made 200 for six at the end of the third and final Test against South Africa at the Basin Reserve on Tuesday.
New Zealand had been chasing an improbable 389 for victory and Williamson showed maturity beyond his 21-years after his more experienced colleagues were destroyed by Morne Morkel's career-best figures of six for 23 that had taken the visitors within sight of a crushing win.
The Proteas still took the series 1-0 after winning the second Test at Seddon Park in Hamilton by nine wickets.
South Africa's fielders did not help themselves, dropping four catches, while Williamson was also given the benefit of the doubt when on seven when television replays were not conclusive that Alviro Petersen had snared a low catch.
Williamson's century was the first by a New Zealander during the series. South Africa's batsmen scored five.
Doug Bracewell was 20 not out at the end of the match, blocking four deliveries of Vernon Philander's final over before the umpires ended the match.
The hosts had needed 389 from 81 overs after Graeme Smith declared at 189-3 an hour into the day but Morkel had destroyed New Zealand's top order by tea.
The tall fast bowler entered the break with figures of 5-11 from 11 overs, leaving the home side flailing at 103-5 and needing to see out another 38 overs to save the match.
Williamson and Kruger van Wyk, however, combined for an 80-run partnership that got New Zealand to a position where they had less than 20 overs remaining to survive.
Van Wyk seemed unnerved when he was hit in the groin by a Morkel delivery and soon hit the ball directly back to same bowler, who stuck out his left hand and held on to the return catch.
The wicket gave Morkel his sixth wicket in the innings and surpassed his previous best of 5-20 against India at Centurion in December 2010.
Williamson and Bracewell then saw New Zealand through to safety, with Williamson bringing up his second Test century with a dangerous single.
The day, however belonged to Morkel, who dashed any hope of a New Zealand victory when he dismissed Daniel Flynn and Brendon McCullum, both for nought, before lunch.
He then had Martin Guptill caught by Jacques Rudolph for 14 and then bowled Dean Brownlie (15) and Daniel Vettori (nought) on successive balls in the middle session.
New Zealand's chase had already been hampered with confirmation captain Ross Taylor would need surgery on his broken left forearm after he was struck by a Morkel bouncer on Monday and would take no further part in the game.
South Africa had resumed on Tuesday on 75-0 and put on 114 in 14.4 overs with AB de Villiers (68) and JP Duminy particularly brutal as they plundered the New Zealand attack for 83 runs in 8.2 overs.
South Africa (1st innings): 474-9 decl.
New Zealand (1st innings): 275
South Africa (2nd innings): (overnight 75-0)
A Petersen run out 39
G Smith c Bracewell b Vettori 41
AB de Villiers c Williamson b Bracewell 68
JP Duminy not out 33
Extras: (w-3, nb-2, lb-3) 8
Total: (for three wickets dec, 29.4 overs) 189
Fall of wickets: 1-77, 2-106, 3-189.
Did not bat: Hashim Amla, Jacques Rudolph, Mark Boucher, Vernon Philander, Dale Steyn, Morne Morkel, Marchant de Lange.
Bowling: Martin 10-0-44-0; Bracewell 6.4-0-47-1 (w-2); Gillespie 6-0-55-0 (nb-2); Vettori 7-1-40-1 (w-1)
New Zealand (2nd innings):
M. Guptill c Rudolph b Morkel 18
D. Flynn c Boucher b Morkel 0
B. McCullum lbw b Morkel 0
K. Williamson not out 102
D. Brownlie b Morkel 15
D. Vettori b Morkel 0
K. van Wyk c&b Morkel 39
D. Bracewell not out 20
Extras: (lb-6) 6
Total: (for six wickets, 80.4 overs) 200
Fall of wickets: 1-1, 2-1, 3-32, 4-83, 5-83, 6-163.
Did not bat: Ross Taylor, Mark Gillespie, Chris Martin
Bowling: Morkel 16.4-7-23-6; Philander 18.4-6-29-0; de Lange 17.2-4-77-0; Steyn 15-9-14-0; Duminy 13-2-51-0.
South Africa won the three-match series 1-0.
Photograph: Hagen Hopkins/Getty Images