Sri Lanka took total control of the second Test against South Africa on Saturday, reaching 151/3 in their second innings at stumps on Day 2 to lead by 365 runs after they declined to enforce the follow-on. South Africa were earlier all out for 124 by tea at Sinhalese Sports Club, giving Sri Lanka a first-innings lead of 214.
Openers Dimuth Karunaratne and Danushka Gunathilaka then added 91 runs for the first wicket of Sri Lanka's second innings.
Keshav Maharaj, who took 9/129 in Sri Lanka's first-innings 338, struck in successive overs to remove Gunathilaka (61) and Dhananjaya de Silva (0).
Sri Lanka also lost Kusal Mendis when he was run out for 18.
Karunaratne was unbeaten on 59 at stumps with Angelo Mathews on 12.
Earlier, Sri Lanka resumed on 277/9 and extended their innings with a record 74-run, last-wicket stand.
South Africa were 19/3 at lunch and lost the remaining seven wickets in the afternoon session.
Sri Lanka lead the two-match series 1-0, having won the first Test by 278 runs.
South Africa have not lost a series to Sri Lanka since 2006.
Maharaj claimed the best Test innings figures by a South African bowler since the country's readmission to international cricket in the second match against Sri Lanka at Sinhalese Sports Club grounds on Saturday. Maharaj finished with nine for 129 from 41.1 overs as Sri Lanka posted 338 runs in its first innings. (Also Read: Report 2nd Test Day 1)
The 28-year-old, who claimed eight wickets on the first day's play, dismissed Sri Lanka's last man Rangana Herath on day two to establish the new record.
The previous best bowling analysis by a South African since the country's return to test cricket in 1992 was Lance Klusener's eight for 64 against India in Calcutta in 1996.
In South Africa's complete cricket history, Maharaj's figures are behind only Hugh Tayfield's nine for 113 against England in Johannesburg more than 60 years ago.