The Springboks trailed at the break and were 27-17 down at one point, but New Zealand prop Ofa Tu’ungafasi’s 69th-minute sin-bin helped the hosts find victory.
The All Blacks scored four tries – one more than the Springboks – but fly-half Sacha Feinberg-Mngomezulu’s kicking proved crucial as he provided 16 points with the boot.