South Africa were all out in their first innings for 359 to lead New Zealand by 91 on the third morning of the second Test in Wellington on Saturday.
The innings folded when Morne Morkel was bowled for 40, equalling his best Test score and after a record South African 10th wicket partnership against New Zealand of 57 with Vern Philander.
Philander was left not out 37, two runs short of becoming the sixth South African to join the 100 wickets and 1,000 runs club.
For South Africa, Quinton de Kock scored 91 and Temba Bavuma 89. Bowling for New Zealand, Colin de Grandhomme took three for 52 and Neil Wagner three for 102.