The Springboks ended a three-match losing streak with a thrilling 31-29 Rugby Championship triumph over the All Blacks on the Gold Coast on Saturday.
In one of the highlights of the tournament, the battle once again went down to the wire, with Elton Jantjies only clinching the result for his team with a last-gasp penalty deep in injury time.
South Africa's other points came via tries from Damian de Allende and Makazole Mapimpi while Handre Pollard succeeded with four penalties and Jantjies added another three-pointer off the kicking tee and a drop goal.
For New Zealand, Sevu Reece, Ardie Savea and Brad Weber scored tries while Jordie Barrett finished with a 14-point haul courtesy of three penalties and a conversion.
The Springboks did most of the early attacking, although Pollard was off target with a penalty attempt in the fifth minute after a high tackle on Makazole Mapimpi. The Boks soon put that setback behind them, however, and opened the scoring courtesy of De Allende's try.
Lukhanyo Am did well to win a loose ball inside New Zealand's 22 before offloading brilliantly out of the back of his hand to Sbu Nkosi, who drew Jordie Barrett before passing to De Allende, who crossed in the right-hand corner.
Pollard's shot at goal was wide of the mark and shortly afterwards the All Blacks opened their account courtesy of a Barrett penalty after Am infringed at a ruck.
Five minutes later, Willie le Roux failed to gather an up-and-under just outside his 22 and the Boks were made to pay as the All Blacks launched a lethal counter-attack with Beauden Barrett finding Reece with a cross-field kick, who did well to score out wide despite a desperate tackle from Duane Vermeulen.
Ten minutes later, Scott Barrett impeded Mazakole Mapimpi while the latter was competing for a high ball and Pollard gave his side an 11-8 lead when he succeeded with the resulting penalty.
Five minutes later, the All Blacks launched an attack from a lineout close to the halfway line with Beauden Barrett doing brilliantly to beat a couple of defenders before getting a pass out to Rieko Ioane. He set off towards the Boks' try line before throwing an inside pass to Savea, who dove over in spectacular fashion.
Full-back Barrett converted to give the All Blacks a 15-11 lead and shortly afterwards Weber pounced when Eben Etzebeth failed to gather a throw-in at a lineout close to South Africa's try line. Etzebeth knocked the ball onto the arm of Joe Moody and Weber gathered before crossing out wide.
Just before half-time, Scott Barrett was blown up for a no-arms tackle on Vermeulen and Pollard stepped up to add his third penalty which gave New Zealand a 20-14 lead at the break.
The second half started in a similar fashion to the first with the Springboks on the attack from the kick-off, and two minutes after the restart, they won a scrum penalty, with Pollard making no mistake from the kicking tee to narrow the gap to three points.
The Boks continued to hold the upper hand and in the 52nd minute, they launched an attack from a lineout close to the All Blacks' try line. Malcolm Marx and Steven Kitshoff put them on the front foot with strong carries before the ball was shifted to the wing where Mapimpi dotted down in the left-hand corner.
The next 15 minutes was an attritional affair as both sides gave their all to win this Test. In the 58th minute. Jantjies extended the Boks' lead when he slotted a penalty after the All Blacks strayed offside on defence. Despite trailing by five points, the All Blacks did not panic and they narrowed the gap again when Barrett added his second penalty in the 67th minute.
That set up a nail-biting finish and in the 74th minute, Barrett slotted his third three-pointer off the kicking tee after Frans Steyn infringed at a breakdown. The world champions did not surrender though and soon after Jantjies landed his drop goal from 30 metres out to give his side the lead again.
There was more drama to come in the game's closing stages, however, and in the 79th minute the All Blacks went in front again courtesy of another Barrett penalty after Franco Mostert was blown up for an indiscretion at a ruck.
But the Boks refused to throw in the towel and launched one final attack in injury time, allowing Jantjies to slot the match-winning kick with the clock in the red after the All Blacks were caught offside on defence again.
South Africa - Tries: Damian de Allende, Makazole Mapimpi. Penalties: Handre Pollard (4), Elton Jantjies (2). Drop goals: Elton Jantjies.
New Zealand - Tries: Sevu Reece, Ardie Savea, Brad Weber. Conversions: Jordie Barrett. Penalties: Jordie Barrett (4).
South Africa: 15 Willie le Roux, 14 Sibusiso Nkosi, 13 Lukhanyo Am, 12 Damian de Allende, 11 Makazole Mapimpi, 10 Handré Pollard, 9 Francois de Klerk, 8 Duane Vermeulen, 7 Albertus Smith, 6 Siyamthanda Kolisi (captain), 5 Lodewyk de Jager, 4 Eben Etzebeth, 3 Trevor Nyakane, 2 Mbongeni Mbonambi, 1 Retshegofaditswe Nché.
Replacements: 16 Malcolm Marx, 17 Steven Kitshoff, 18 Vincent Koch, 19 Franco Mostert, 20 Jasper Wiese, 21 Herschel Jantjies, 22 Elton Jantjies, 23 Frans Steyn.
New Zealand: 15 Jordie Barrett, 14 Sevu Reece, 13 Anton Lienert-Brown, 12 David Havili, 11 Rieko Ioane, 10 Beauden Barrett, 9 Brad Weber, 8 Luke Jacobson, 7 Ardie Savea (captain), 6 Akira Ioane, 5 Scott Barrett, 4 Brodie Retallick, 3 Nepo Laulala, 2 Codie Taylor, 1 Joe Moody.
Replacements: 16 Asafo Aumua, 17 George Bower, 18 Ofa Tuungafasi, 19 Patrick Tuipulotu, 20 Ethan Blackadder, 21 TJ Perenara, 22 Richie Mo’unga, 23 Damian McKenzie.
Referee: Matthew Carley (ENG)
Assistant referees: Damon Murphy (AUS), Jordan Way (AUS)
TMO: Brett Cronan (AUS)