Hosts, South Africa moved a step closer to the World Test Championship final with a 109-run victory over Sri Lanka.
The Proteas needed just 14.1 overs to take the five remaining Sri Lanka wickets on day five in the Eastern Cape and secure a 2-0 series win that takes them above Australia to the top of the WTC table.
Temba Bavuma’s side will guarantee their place in the Lord’s final in June if they win both Tests in their two-match series against Pakistan that begins on Boxing Day.
Sri Lanka opened the day on 205 for 5, needing another 143 to win at St George’s Park.
However, left-arm spinner Keshav Maharaj broke the partnership in the fourth over of the day as Mendis edged to slip.
Dhananjaya was caught behind 14 balls later and the tourists quickly crumbled to 238 all out – the last five wickets going down for 19 runs.
Maharaj took three of the wickets to fall on the fifth morning to complete his 11th five-wicket haul in Tests.
Centuries from Kyle Verreyne and Ryan Rickelton helped set up the victory for South Africa, while 35-year-old seamer Dane Paterson claimed his maiden Test five-to earn them a narrow first-innings lead.
Bavuma and Aiden Markram then made half-centuries in the hosts’ second innings to set a challenging target of 348 that ultimately proved beyond Sri Lanka.
Final scores, South Africa 358 and 317, Sri Lanka 328 and 238.