Sri Lanka 232 for 6 (Wellalage 113, Somarathne 57*, Maphaka 3-60) beat South Africa 167 (Maree 44, de Silva 2-14, Daniel 2-28) by 65 runs
Opting to bat, Sri Lanka had slipped to 25 for 3 by the ninth over, with South Africa's 15-year-old fast bowler Kwena Maphaka sending the openers back in a fiery first spell. Shevon Daniel and Wellalage then rebuilt with a 62-run fourth-wicket stand, before Daniel was dismissed for a 54-ball 29.
By then, Wellalage had played himself in and found strong support from Ranuda Somarathne. The pair added 130, during which Wellalage, who has been a key performer with both bat and ball during the campaign, brought up his century. He eventually fell in the penultimate over of the innings, but not before helping Sri Lanka shift gears.
Somarathne himself hit three fours and two sixes in his unbeaten 57 as Sri Lanka ended with a competitive 232 for 6, with the last ten overs counting for 76 runs.
With scores of 65, 104, 96 and 97 in four of his last five innings, Dewald Brewis - nicknamed "Baby AB" - was key to South Africa's chase. But he managed just 6 this time, and was the second wicket to fall inside the powerplay overs.
Gerhardus Maree made 44 at just better than a-run-a-ball, but South Africa lost wickets around him and that made it a tall ask for the lower-middle order. With South Africa at 117 for 7, Sri Lanka smelt victory, which they eventually closed out in the 38th over as South Africa were bowled out for 167. Five of the six Sri Lanka bowlers - only last week's star performer Vinuja Ranpul missed out - were among the wickets.
Sri Lanka have now advanced to the fifth-place playoffs, while South Africa will compete for the seventh spot.
Uganda 226 (Lutaaya 64, Murungi 49, Cairns 6-24) beat Scotland 170 (Jarvis 37, Miyaji 4-25, Kidega 3-23) by 51 runs via DLS method