South Africa are chasing another seven wickets for victory in the first Test against Sri Lanka after bad light brought day three to an early close.
Kagiso Rabada, Vernon Philander and Duanne Olivier took a wicket apiece to set the Proteas on their way to victory after they had set Sri Lanka 304 to win in Durban.
Despite half-centuries from Faf du Plessis (90) and Quinton de Kock (55), Sri Lanka had given themselves hope as they took the last five South African wickets for just eight runs with debutant Lasith Embuldeniya taking 5-66 and Vishwa Fernando claimed 4-71.
The day began well for South Africa with Du Plessis and De Kock adding 85 to the overnight total, taking their partnership to 96, before Embuldeniya got one to turn sharply back into De Kock and trap him lbw, shortly after the left-hander had passed 50 for the second time in the match.
Du Plessis and Philander put on 60 for the sixth wicket but when Embuldeniya bowled the latter to break the stand, the hosts imploded.
Fernando claimed three of the four remaining wickets, including Du Plessis lbw as the Proteas captain shouldered arms, and Embuldeniya the other as South Africa went from 251-5 to 259 all out.
The Sri Lankan openers got safely through to tea and had put on 42 when Lahiru Thirimanne (21) edged Rabada to Du Plessis at second slip.
Philander pinned Dimuth Karunaratne (20) in front in the next over and Kusal Mendis followed the openers back to the pavilion a couple of overs later, feathering an Olivier bumper behind.
Oshada Fernando (28no) and Kusal Perera (12no) had taken Sri Lanka to 83-3 by the time bad light stopped play but the tourists remain up against it, needing another 221 to win when play resumes on day four.
Watch day four of the first Test between South Africa and Sri Lanka from 7.55am, Saturday on Sky Sports Cricket.