A dominant century from opener Dean Elgar gave South Africa the edge on a fiercely-fought first day of the second Test against Sri Lanka in Cape Town.
Elgar struck 129 - his sixth Test ton a career best - as he put on a 103-run stand with Quinton de Kock (68no) for the sixth wicket, thought he fell just before stumps, the hosts closing on 297-6.
Earlier, Rangana Herath had removed South African skipper Faf du Plessis (38) shortly before tea to reduce the hosts to 142-4, which soon turned to 169-5 after the interval with the dismissal of Temba Bavuma (10).
But the Proteas - who lead the three-Test series 1-0 - finished the day the stronger of the two sides even with Suranga Lakmal’s late wicket of Elgar. Sri Lanka won the toss and again opted to bowl first on a grassy looking surface at Newlands, and they struck immediately as Stephen Cook departed for a duck, edging Lakmal (2-69) behind fourth ball.
Elgar and Hashim Amla (29) seemed to have weathered the storm as they took the total to 66 shortly before lunch when Lahiru Kumara (3-86) - playing in only his third Test and sixth first-class match - suddenly struck twice in one over.
The 19-year-old seamer bowled with good pace, smashing Amla’s stumps with one that nipped between bat and pad, while five balls later he had JP Duminy out caught down the legside for a duck. Elgar went through to his half century, and found a willing partner in skipper Du Plessis, as the pair put on 76 together for the fourth wicket, the latter surviving a dropped catch by Upul Tharanga when on 31.
But it did not prove too expensive an error as Herath (1-34) had Du Plessis out edging to Angelo Mathews at slip soon after.
Kumara’s third strike of the day - Bavuma caught at deep square leg - had Sri Lanka hopeful of ending the South African innings before the day’s end, only for Elgar and De Kock to deny them.
Elgar brought up his hundred off 186 balls, while De Kock notched an eighth Test fifty off a brisk 61 deliveries, but then Elgar edged behind with little more than five overs left in the day.