Rugby Championship winners New Zealand produced a stunning fightback to beat South Africa 32-30 in Pretoria.
However, tries in the closing four minutes from Scott Barrett and Ardie Savea drew the visitors level.
Richie Mo’unga sealed a remarkable victory with the conversion, the last kick of the match.
After his team came from a 17-point deficit for the second time in the match, All Blacks captain Kieran Read said: “You have got to have belief deep down that you can back. Both teams were outstanding and across the two games we are split even on the scoreboard.”
Counterpart Siya Kolisi saw his South African side squander a 12-point advantage in the final four minutes and admitted: “We let it go at the end, they were more alert than us.
“It was really good at times, we will have to learn from this and go back and look at we need to do next time. But I’m proud of the way the team is growing.”
The All Blacks now head out on tour, beginning against Japan in Tokyo on 3 November, before they face England at Twickenham on 10 November.
South Africa: Le Roux; Kolbe, Kriel, De Allende, Dyantyi; Pollard, De Klerk; Kitshoff, Marx, Malherbe, Etzebeth, Mostert, Kolisi, Du Toit, Louw.
Replacements: Mbonami, Mtawarira, Koch, Snyman, Notshe, Papier, Jantjies, Willemse.
New Zealand: B. Smith; Naholo, Goodhue, Williams, R. Ioane; B. Barrett, A. Smith; Tuinukuafe, Taylor, Franks, S. Whitelock, S. Barrett, Frizell, Cane, Read.
Replacements: Harris, Perry, Tu’ungafasi, Tuipulotu, Savea, Perenara, Mo’unga, Crotty.