New Zealand battled their way back into the first Test against South Africa with four wickets on the second morning in Dunedin on Thursday, including centurion Dean Elgar.
Elgar, who batted South Africa out of trouble on day one, fell to former schoolboy rival Neil Wagner for 140 during a short-ball barrage.
His overnight partner Temba Bavuma (64) was removed by Trent Boult who also claimed Keshav Maharaj, who made five, while and Quinton de Kock was dismissed by his nemesis Jeetan Patel for just 10 as New Zealand took four for 72 runs in the session.
South Africa, having resumed the day at 229 for four, were 301 for eight at lunch on day two, with Vern Philander on 16 and Kagiso Rabada on two.
Elgar was caught behind for 140, his highest Test score, ending a 299-ball stay in the middle and a 104-run stand with Bavuma for the fifth wicket.
Wagner spoke before the Test of how the pair "had a lot of battles" at school level in South Africa before he emigrated to New Zealand and he was keen to continue the rivalry.
He pinned down Elgar with 14 consecutive deliveries at the start of the day before the South African shakily resumed scoring with a top-edge over slips to the boundary.
Elgar edged another ball which fell just short of Ross Taylor at first slip before eventually being undone by a bouncer that clipped the bat and sailed through to wicketkeeper BJ Watling.
After Patel had dominated de Kock in the recent one-day internationals, he was immediately introduced to the attack after Elgar's dismissal and took just 13 deliveries before he had his man caught by Wagner at backward point.
Bavuma, who posted his fifth Test half-century, was caught behind for 64 off Boult who picked up the wicket of Maharaj seven balls later.