Hashim Amla scored a double century and Temba Bavuma reached his maiden hundred as South Africa batted their way to safety on the fourth day of the second Test against England at Newlands on Tuesday.
South Africa made 627 for seven before declaring two runs short of England’s first-innings total of 629 for six declared.
England openers Alastair Cook and Alex Hales negotiated a tricky six overs, reaching 16 for no wicket at the close. They will go into the last day with an overall lead of 18 runs.
Amla made 201 and Bavuma 102 not out in a South African innings which lasted for 211 overs and more than two days.
Amla was involved in the first two big stands, 183 for the third wicket with AB de Villiers (88) and 171 for the fourth with Faf du Plessis (86).
But there was still some alarm for South Africa when three wickets, including those of Amla and Du Plessis, fell to the third new ball soon after lunch.
Bavuma and new cap Chris Morris came together with their side still 180 runs behind with five wickets remaining and England still hoping to secure a good first innings lead.
But the pair played fearless cricket and added 167 runs, a South African seventh wicket partnership record against England.
Bavuma, the first black African batsman to play Test cricket for South Africa, struck the ball cleanly as he raced to 50 off 52 balls with 11 fours.
He was made to work harder for his second fifty, which he reached off 140 deliveries with a thick edge off Steven Finn which went to the boundary for his 16th four.
England’s bowlers toiled with minimal reward on a pitch which offered no assistance. Their cause was not helped by a rash of missed chances, with nine catches going down in the innings.
Amla benefited from four dropped or missed catches, while De Villiers, Du Plessis, Bavuma and Morris (two) all gave chances.
Stuart Broad and James Anderson struck three times with the third new ball in a rare period of ascendancy for the bowlers.
Amla was bowled off bat and pad and Du Plessis followed four balls later, caught in the gully off Anderson. Quinton de Kock made only five before pulling a short ball from Broad to backward square leg.
Amla, who made his fourth Test double century, batted for 707 minutes, faced 477 balls and hit 27 fours.
With a draw almost assured, England look set to take a 1-0 lead into the third Test of the four-match series in Johannesburg next week.