An unbeaten 76 from opener Dean Elgar led a South African fightback as they reached 147 for four at tea on the opening day of the second test against Sri Lanka at Newlands on Monday.
Captain Faf du Plessis survived a dropped catch to contribute 38 to a 76-run partnership with Elgar as South Africa lost one wicket in the second session, having been 69 for three at lunch.
Sri Lanka struggled to make further inroads with Du Plessis the only wicket to fall as he attempted an expansive drive to Rangana Herath’s left-arm spin and was caught at first slip by Angelo Mathews.
Elgar and Du Plessis had both played measured innings sprinkled with a few aggressive shots to revive the hosts after early problems.
Du Plessis was dropped on 31 by Upul Tharanga off Herath but it did not prove expensive as the veteran spinner got his man soon afterwards.
Before lunch, teenage seamer Lahiru Kumara claimed two quick scalps on a bowler-friendly surface, dismissing Hashim Amla and JP Duminy in the same over.
Amla, continuing his indifferent form, was clean bowled for 29 and five balls later Duminy gloved a quick leg-side delivery to be caught after an acrobatic leap by wicketkeeper Kusal Mendis.
Sri Lanka won the toss and decided to bowl on a green strip, making an immediate breakthrough before South Africa had scored a run with the fourth ball of the match.
Stephen Cook, who scored a century and was named man of the match in the first test in Port Elizabeth, pushed at a rising delivery from Suranga Lakmal and got a faint edge to Mendis.
The 21-year-old had taken over the gloves from Dinesh Chandimal, who is playing but was feeling unwell at the start of play.
Inconsistent bowling allowed Elgar and Amla to weather the next 21 overs and establish a 66-run partnership before the 19-year-old Kumara, playing only his third test, was brought into the attack.
The teenager replaced Dushmantha Chameera in the line-up for the second test in one of two changes for Sri Lanka, who lost by 206 runs in Port Elizabeth in the first game of the three-match series.