Sri Lanka’s batsmen struggled to 181-7 as South Africa’s pace bowlers took charge of the second day of the first Test in Port Elizabeth.
The home side were bowled out for 286 as seamer Suranga Lakmal took his first five-wicket haul in Test cricket.
Vernon Philander and Kyle Abbott struck early to leave Sri Lanka on 22-3 after eight overs.
However Dhananjaya de Silva’s unbeaten 43 steadied the innings before bad light ended play.
Philander and Abbott bowled accurately in helpful conditions to dismiss Sri Lanka’s top order, before captain Angelo Mathews made a patient 39.
De Silva, batting at seven, was dropped on 27 and went on to hit five boundaries from 69 balls to halt a collapse.
Sri Lanka have won just one of their last seven Test matches in South Africa.