Dean Elgar made the most of being dropped early in his innings to score his seventh Test century and anchor South Africa's 229 for four at the close of play on the opening day of the first Test against New Zealand in Dunedin on Wednesday.
The left-handed opener, who was spilled down the leg side by wicketkeeper BJ Watling on 36 shortly after lunch, brought up his century from 197 balls with his 20th boundary.
The 29-year-old finished on 128 not out and also combined with captain Faf du Plessis (52) for a 126-run partnership that resurrected his side's innings after they had slumped to 22-3 in a difficult first session of the three-match series.
Temba Bavuma, who joined Elgar before tea when du Plessis was dismissed, was on 38 not out at the close.
Du Plessis was caught in the deep by Trent Boult off all-rounder Jimmy Neesham three balls after he had a leg before decision overturned on review.
The Proteas were rocked by the loss of three early wickets when left-arm seamer Neil Wagner claimed two victims in one over following du Plessis's late decision to bat after winning the toss.
Du Plessis finally opted against bowling first when he noticed that New Zealand had dropped pace spearhead Tim Southee to play two spinners in Jeetan Patel and Mitchell Santner.
The visitors had been under pressure when they resumed after lunch on 63-3 and New Zealand could have driven home their advantage had Watling held on when Elgar got a thick edge in the second over of the session.
New Zealand had seized the early advantage when skipper Kane Williamson introduced Patel in the sixth over, with the off-spinner proving difficult to get away as he extracted bounce and turn off the pitch.
Paceman Boult then got a delivery to swing back into right-handed opener Stephen Cook, who offered no shot and was given out lbw for three to leave the hosts 10-1 in the ninth over.
Williamson then reintroduced Wagner and he struck immediately to remove the dangerous Hashim Amla for one.
Four balls later, he had JP Duminy caught at first slip by Ross Taylor, also for one, from a rising delivery that brushed a glove to leave the visitors in dire trouble.
Following the first Test, the teams head to Wellington before concluding the series in Hamilton.
Scorecard
South Africa 1st innings
S. Cook lbw Boult 3
D. Elgar not out 128
H. Amla b Wagner 1
J. Duminy c Taylor b Wagner 1
F. du Plessis c Boult b Neesham 52
T. Bavuma not out 38
Extras: (b4, lb1, w1) 6
Total: (4 wickets; 90 overs) 229
Fall of wickets: 1-10, 2-20, 3-22, 4-148.
Bowling: Boult 22-10-44-1, Wagner 20-4-59-2, Patel 24-9-60-0, Santner 18-5-32-0, Neesham 6-2-29-1.