Sri Lanka 49 for 1 (Karunaratne 28*) trail South Africa 235 (de Kock 80, Vishwa 4-62, Rajitha 3-68) by 186 runs
Durban: The hosts were all out for 235 after being put into bat in Durban, where Quinton de Kock's eye-catching 80 salvaged something approaching respectability after a poor start.
Vishwa Fernando was in fine form as he took 4-62, while Kasun Rajitha (3-68) provided excellent support to help Sri Lanka establish a solid platform for success.
They had reached 49-1 in reply when bad light intervened, with captain Dimuth Karunaratne (28*) and Oshada Fernando (17*) steadily building a partnership after Lahiru Thirimanne had departed for a 15-ball duck.
The tourists won the toss and were quick off the mark to leave South Africa reeling as Dean Elgar was dismissed without scoring and Hashim Amla followed soon after.
Amla had just appreciated a respite after umpire Aleem Dar ruled Sri Lanka had taken too long to even think about asking for an audit following a lbw bid that replays recommended would have succeeded.
That would have left the Proteas on 0-2, in spite of the fact that they were before long stepping water after Aiden Markram's takeoff saw them slip to 17-3.
The hosts appreciated a short rally as Temba Bavuma and Faf du Plessis put on a 72-run association, yet Rajitha had the Proteas commander gotten behind endeavoring to flick to leg before lunch.
Suranga Lakmal thought he had De Kock gotten behind promptly toward the evening, just for an audit to save the wicketkeeper-batsman, however Bavuma fell three runs shy of his 50 years in the most lamentable conditions.
Remaining at the non-striker's end, Bavuma was run out after De Kock's drive redirected off Vishwa Fernando's boot and onto the stumps with the right-hander shy of his ground.
Rajitha represented Vernon Philander got and bowled and Keshav Maharaj edged a Vishwa Fernando conveyance behind as the home side limped to tea on 181-7.
Sri Lanka were before long back in all out attack mode after the interim, Kagiso Rabada effectively gotten subsequent to misinterpreting a low full hurl from the enthusiastic Vishwa Fernando.
Lasith Embuldeniya clean bowled Dale Steyn (15) and De Kock was, maybe fittingly, the last to go.
Sri Lanka's answer endured an early misfortune as opener Thirimanne neglected to get by in the melancholy conditions, however Karunaratne and debutant Oshada Fernando will return on Thursday well set.