Henry Nicholls' century and a pair of late wickets helped New Zealand back into the second Test against South Africa on the opening day in Wellington.
Nicholls' maiden Test ton rescued the Black Caps at Basin Reserve on Thursday, as they were bowled out for 268 after being put in to bat on a grassy wicket.
Despite the conditions, it was the spinners in JP Duminy (4-47) and Keshav Maharaj (2-47) who did most of the damage for the tourists.
However, it meant a tricky period before stumps for South Africa and they lost both openers prior to the close of play.
Stephen Cook (3) saw his poor run of form continue and Dean Elgar, who starred in the drawn first Test in Dunedin, was also dismissed.
Hashim Amla (0) and nightwatchman Kagiso Rabada (8) will resume at the crease on day two, with South Africa 24-2.
Edged and taken.de Grandhomme strikes, Elgar goes for 9. SA 12/2 (5.3 ovs). Amla comes in sooner than he would have thought. In him we trust pic.twitter.com/fkQh13bbT7-- Cricket South Africa (@OfficialCSA) March 16, 2017
It had looked certain to be a better day for an unchanged South Africa, who won the toss and elected to bowl.
Tom Latham survived a huge lbw shout before departing for eight, edging to Elgar off Morne Morkel (2-82).
Rabada (2-59) took the big wicket of Kane Williamson (2), the captain reviewing an lbw decision, only for ball tracking to be unavailable.
Debutant Neil Broom, one of three changes for New Zealand as he replaced the injured Ross Taylor, went for a duck.
Wicketkeeper Quinton De Kock took an excellent catch after Rabada got a delivery to seam away and bring an edge, leaving the Black Caps at 21-3.
Opener Jeet Raval battled as wickets fell around him, struggling to 36 but departing just before lunch in a perfect start to the day for South Africa.
Jimmy Neesham (15) fell cheaply before Nicholls and BJ Watling (34) combined for a crucial 116-run sixth-wicket partnership.
Nicholls was impressive, bringing up his century with two boundaries in three balls off Rabada, hooking for four to reach his ton.
His departure would lead to a relatively quick end to the innings, despite handy hitting from Trent Boult's replacement Tim Southee (27) and Jeetan Patel (17 not out).
As they needed to, the Black Caps would strike before stumps, Cook edging Southee (1-18) to Neesham at second slip and Elgar doing likewise off Colin de Grandhomme (1-2).