South African captain Hashim Amla defied England's bowlers and batted throughout the third day of the second Test at Newlands on Monday.
Amla made an unbeaten 157 as South Africa reached 353 for three at the close, still 276 runs behind England's first innings total of 629 for six declared.
AB de Villiers was the only batsman dismissed during the day as South Africa, 1-0 down in the four-Test series, dug in on a pitch which offered no assistance to the bowlers.
"We were behind the eight ball and it needed a really resilient performance to get back in the game," said Faf du Plessis, who finished the day on 51 not out.
"To lose one wicket in the day is a really good effort. We are really proud of Hash."
Steven Finn was the only successful bowler. He had De Villiers caught at midwicket shortly before tea after Amla and De Villiers had put on 183 in a third wicket partnership which lasted for two minutes short of five hours.
"We stuck to our guns very well," said Finn. "We created a couple of chances, we changed our pace, our fields, our lengths, trying to create something.
"We're still a long way ahead of the game because we didn't let South Africa get away from us."
Du Plessis, who like Amla had endured a lean spell with the bat, helped his captain put on an unbeaten 85 for the fourth wicket.
It was a crucial innings for Amla, who was under pressure for both his captaincy and his batting. South Africa have not won a Test since beating the West Indies at the same venue a year ago, while Amla had made only 150 runs at an average of 15.00 in 10 innings since that match.
- 'Step forward' -
It was a triumph of technique and concentration as he made his first Test century since he hit 208 against the West Indies in Centurion in December 2014. By the close he had batted for nine hours and 26 minutes and had faced 371 balls. His innings included 21 fours.
"Hashim has been working really hard in the nets," said Du Plessis. "For him and AB to put a big score together was a huge step forward for the team."
After the worst year of his international career, Amla had two strokes of luck. He was dropped by James Anderson at slip off Joe Root when he was on 76 and by Nick Compton at backward point off Steven Finn when he had 120.
With South Africa's batting having been fragile for most of 2015, the partnership between Amla and De Villiers, the side's two senior batsmen, was important for the team.
Both men batted solidly for the most part but had anxious moments which required decisions by television umpire Rod Tucker.
Amla managed to get his bat down just in time after Finn deflected a drive by De Villiers into the stumps at the bowler's end. De Villiers was given out leg before wicket to Ben Stokes by umpire Aleem Dar when he had 85, but De Villiers immediately sought a review which showed the ball had gone off an inside edge onto his pad.
De Villiers scored only three more runs before he pulled a short ball from Finn hard but straight to Anderson at midwicket. He had defied the England bowlers for 298 minutes and 211 balls, hitting 12 fours and a six.
By contrast to the second day, when Ben Stokes and Jonny Bairstow thrashed 196 runs for England before lunch and 453 runs were scored in the day for the loss of three wickets, it was attritional cricket, with only 212 runs scored in 87 overs.
"If we can bat well tomorrow and make the English attack tired it would be a big win for us mentally," added Du Plessis.