On a day dominated by the bat, Sri Lanka A seized a 181-run lead over their South African counterparts, with five wickets still remaining in their first innings.
Resuming on 251 for 2, overnight centurion Tharanga Paranavitana took the score to 374 along with Angelo Mathews before he was out caught-behind off medium-pacer CJ de Villiers for 159. South Africa, though, once again had to wait a while for the next wicket, as Mathews and Thilina Kandamby put on a century stand.
Mathews was also caught by wicketkeeper Heino Kuhn, off Johann Louw, for 131. Kandamby, the captain, then pushed to his century, the third of the innings. His 138 came at a brisk pace, with a strike-rate of over 75. Sri Lanka, as on the second day, maintained a rate of more than four an over.
Wicketkeeper Kaushal Silva got to a fifty as well, and added 142 for the fifth wicket with Kandamby. He and Dilruwan Perera were the unbeaten batsmen at stumps. Three of South Africa's bowlers also posted centuries, with offspinner Thandi Tshabalala conceding 207 runs off his 48 overs.