An unbeaten hundred from Dean Elgar rescued South Africa from a grim start to take the honours on day one of the first Test against New Zealand on Wednesday.
It was the opener's seventh Test century, and one of the most important, in a patient innings after South Africa were in early trouble at 22 for three in Dunedin.
By stumps they were 229 for four with Elgar on 128, and Temba Bavuma on 38.
Elgar set the tone for the revival with a 126-run stand for the fourth wicket with captain Faf du Plessis and followed with an unbroken 81 for the fifth wicket with Bavuma.
Although the pitch offered little support for the bowlers, for the batsmen it was a constant struggle to score with 30 maidens among the 90 overs bowled.
Elgar left when he could, blocked when he needed to, and punished anything loose with 20 boundaries in his century which took 197 balls to compile.
He offered a rare chance on 36, when he was dropped down the legside by wicketkeeper BJ Watling, and on 42 escaped a possible run-out when Neil Wagner failed to field the ball cleanly.
New Zealand had nine overs with the new ball before stumps and conceded 18 runs without threatening the batsmen.
On a day of wavering fortunes, there was nothing normal about the start of the Test where even the brown-green wicket was not the customary emerald top expected in New Zealand.
When du Plessis won the toss he became the first captain in 23 Tests to bat first.
New Zealand dropped regular bowling spearhead Tim Southee for the first time in five years to make way for Jeetan Patel.
It was the first time in seven years they had fielded two spinners on a home wicket.
The miserly Patel was brought into the attack in the sixth over and conceded only eight runs in his first 10 overs with South Africa restricted to 63 for three in the first session.
But as the New Zealand bowlers tired, South Africa added 90 for the loss of one wicket in the middle session and 76 without loss after tea.
Left-armers Trent Boult and Wagner did the early damage for New Zealand with Boult's first nine overs claiming the wicket of Stephen Cook and yielding only eight runs.
South African-born Wagner, returning to top level cricket for the first time since breaking a finger on his bowling hand five weeks ago, removed Hashim Amla and JP Duminy in one over on his adopted home ground.
Jimmy Neesham was New Zealand's other successful bowler taking the valuable wicket of du Plessis for 52 three overs before tea.