South Africa stunned the All Blacks to secure their first victory in New Zealand since 2009 with a thrilling 36-34 win at the Westpac Stadium.
The hosts were chasing their 40th successive win on home soil stretching back to that Springboks defeat more than nine years ago and after, trailing 24-17 at half-time, almost snatched something at the death.
They enjoyed a sustained period of pressure with possession just two metres short of the try line at the hooter, but South Africa's determined defence paid off and an errant knock-on well into the 84th minute dashed All Black hopes.
It was New Zealand's first loss in the Rugby Championship since 2015, a run of 15 matches, with South Africa's 36 points the most scored against the All Blacks in a home Test.
Aphiwe Dyantyi (twice), Willie Le Roux - sent to the sin-bin in the 66th minute - Malcolm Marx and Cheslin Kolbe all crossed for the Springboks, for whom Handre Pollard kicked a penalty and four conversions.
Rieko Ioane scored twice for the All Blacks, with Jordie Barrett, Aaron Smith, Codie Taylor and Ardie Savea also on the scoresheet but Beauden Barrett had a poor game with the boot, converting just two of his six shots at goal, including hitting the post trying to convert Savea's five-pointer late in the game.