Sri Lanka surged to 151 for 3 in their second innings on Saturday -- a 365 run overall lead -- as they sought a whitewash triumph over South Africa in their two Test series.
At the end of the second day of the second Test in Colombo, Dimuth Karunaratne was on 59 while Angelo Mathews had 12.
Sri Lanka built up their domineering lead at the end of a day in which their 10th wicket pair added valuable runs to build a first innings of 338.
Sri Lanka's Akila Dananjaya earlier took five wickets as South Africa crumbled to 124 all out on the second day of the second Test on Saturday and facing a whitewash in the two-match series.
Sri Lankan spinners ran riot on the dry pitch in Colombo after the home side made 338 with Dananjaya starring in a last-wicket stand with Rangana Herath.
Herath and Dilruwan Perera took the remaining five South African wickets between them, with captain Suranga Lakmal not required to deliver a single ball in the innings.
Already a game down after poor batting in the first Test, only South Africa captain Faf du Plessis and wicketkeeper Quinton de Kock showed resistance, making 48 off 51 balls and 32 off 31 respectively.
South Africa lasted only 34.5 overs, after Sri Lanka had batted for 104.1 overs in their first innings.
Dananjaya, left out for the first Test at Galle, struck with his second ball of the match, having Dean Elgar caught at gully with a turning offbreak.
He got Theunis de Bruyn edging behind in the next over, and Perera picked up the South Africa middle order to finish on four for 40.
The only batsman to put any pressure on Sri Lanka was du Plessis, who attacked the spinners after lunch, sweeping with abandon as he struck eight fours and a six.
He and Hashim Amla put on the best partnership of 55, but Perera dismissed them both within four overs of each other. Despite de Kock's aggressive innings, the remainder of South Africa's batting fell away quickly.
Dananjaya came back to clean up the tail, completing the second five-wicket haul in his three-Test career.
Herath and Dananjaya hit out with the bat in the morning, as Sri Lanka's final pair put on 74 to haul the hosts to 338.
South Africa's left-arm spinner Keshav Maharaj eventually dismissed Herath to end the innings, and complete a haul of nine for 129 -- the second-best for a South Africa bowler ever, and the best since the country returned to Test cricket in 1991.