Sri LankaM 191 (Kusal Perera 51, Steyn 4-48) and 83 for 3 (Oshada Fernando 28*) require another 221 runs to beat South Africa 235 (de Kock 80, Vishwa 4-62, Rajitha 3-68) and 259 (du Plessis 90, de Kock 55, Embuldeniya 5-66, Vishwa 4-71)
Durban: Debutant spinner Lasith Embuldeniya took five wickets as Sri Lanka produced a strong fightback with the ball on day three of the first test, but hosts South Africa remained on course for victory at the close at Kingsmead on Friday.
Set a target of 304 to win, Sri Lanka were 83 for three when bad light brought a premature end to proceedings, with Oshada Fernando (28 not out) and Kusal Perera (12 not out) to resume the victory hunt on the fourth morning.
The impressive Embuldeniya had earlier claimed 5-66 and sparked a South Africa collapse as the hosts were bowled out for 259 in their second innings, leaving Sri Lanka to chase what seems an unlikely victory.
The tourists have not posted over 300 in any of their last 12 test innings, while the record fourth innings total to win a game in Durban is 336 by Australia in 1950.
Openers Dimuth Karunaratne (20) and Lahiru Thirimanne (21) had put on 42 for the first wicket of Sri Lanka's chase, before the latter was caught by Faf du Plessis at second slip off the bowling of Kagiso Rabada.
Visiting captain Karunaratne was out soon afterwards, trapped leg before wicket by Vernon Philander as the tourists wobbled.
They were three down two overs later when Kusal Mendis (0), batting with an injured finger, could only guide a Duanne Olivier delivery to wicketkeeper Quinton de Kock.
Sri Lanka batted another anxious nine overs before the cloud cover that had threatened for much of the day forced the players from the field as the umpires deemed the light too gloomy to continue.
The visitors had skittled out South Africa’s lower order 40 minutes before tea, taking the final five wickets for the addition of only eight runs.
The home side were reasonably comfortable on 251 for five, but lost Philander (18) when he was bowled by a ball that kept low from the Embuldeniya.
Home captain Du Plessis (90) had looked largely in control, but was out when he left a straight ball from Vishwa Fernando (4-71) that trapped him leg before wicket, with the seamer going on to collect two more wickets for a total of eight in the match.
It was a swift end to South Africa's second innings, but a sign of the variable bounce and generous turn on offer to the bowlers that will make Sri Lanka’s chase that much harder.
The second and final test of the series will be played in Port Elizabeth from Feb. 21-25.