Damian de Allende was shown a late red card as New Zealand beat a spirited South Africa side 25-24 in an enthralling encounter at Newlands to finish the Rugby Championship with a 100 per cent record.
The world champions consigned the Springboks to a humiliating record 57-0 hammering at North Harbour Stadium last month, but it was a very different story in an almighty tussle in Cape Town three weeks later.
South Africa threw everything at the All Blacks and led with 10 minutes remaining, but Damian McKenzie went over to add to a controversial Ryan Crotty try and a Rieko Ioane breakaway score before De Allende was dismissed after being deemed to have elbowed Lima Sopoaga in the head.
The outstanding Malcolm Marx scored South Africa's third try with just a minute to play after Ross Cronje and Jean-Luc du Preez also dotted down in the second half, but their three-year wait for a win over New Zealand goes on.
New Zealand lost Beauden Barrett, who went off for a head injury assessment and did not return, and Nehe Milner-Skudder (shoulder) to injury in the first half but the champions just about did enough to make it six wins out of six.
Australia will finish runners-up to New Zealand if they beat Argentina in the final match of the tournament later on Saturday.