Kumar Sangakkara remained unbeaten after a sparkling half-century as Sri Lanka responded well to the challenge of scoring 370 runs in four sessions in order to win the first Test against South Africa.
South Africa first innings 455-9d
Sri Lanka first innings 292
South Africa second innings 206-6d
Sri Lanka second innings
U Tharanga c †de Kock b Steyn 14
K Silva not out 37
K Sangakkara not out 58
Extras (lb 1) 1
Total (1 wicket; 32 overs) 110
Fall of wickets 1-14
Sangakkara (58*) and Kaushal Silva (37*) forged an unfinished second wicket partnership of 96 runs to power the hosts to a strong 110 for one by the close of the fourth day's play.
Opener Upul Tharanga (14) began on a positive note before throwing his bat at a ball to edge Dale Steyn and perish caught behind. Sangakkara joined Silva and went onto complete his 49th Test fifty off 66 balls with seven fours and one six.
Sri Lanka need to score 260 runs on the final day with nine wickets in hand to take lead in the two-Test series.
Earlier, a brisk half-century from AB de Villiers put South Africa in position to declare their second innings on 206 for six wickets at tea.
De Villiers' struck 51 off 58 balls on a turning pitch as the tourists added a swift 143 runs in the second session for the loss of four wickets.
JP Duminy was at the wicket unbeaten on eight at the declaration having lost Quinton de Kock in the last over before the break for 36.