South Africa have established a huge 432-run lead over Sri Lanka in the first Test match after dominating all three sessions on Wednesday.
The Proteas went into the third day's play keen to bowl out their opponents - who were on 181-7 - and they allowed them just 24 more runs to end the first innings with an advantage of 81.
However, Stephen Cook and Dean Elgar soon set about extending the lead and the pair put on an opening partnership of 116 runs before Elgar was dismissed for 52.
Hashim Amla added a quick-fire 48 as Sri Lanka struggled with the ball and Cook only lost his wicket after hitting a knock of 117 to leave South Africa on 245-3.
Sri Lanka improved to reduce their hosts to 267-5 but Faf Du Plessis (41) and Quinton de Kock (48) ended the day unbeaten to leave South Africa in full control and Sri Lanka awaiting a likely declaration on Thursday morning.