Opener Pathum Nissanka played a magnificent lone hand for Sri Lanka reaching 72 from 58 balls with six fours and three sixes before finally falling in the 19th over when he pulled a Dwaine Pretorius slower ball to Anrich Nortje at deep mid-wicket.
Nortje struck the first blow by removing Kusal Perera’s middle stump for just seven runs with the total on 20 but South Africa had to wait another 41 runs before the second wicket fell when Charith Asalanka, who struck Keshav Maharaj for two sixes in his 21 from 14 balls, was run out by a fine throw from Kagiso Rabada in the deep.
Shamsi then struck with successive caught and bowled dismissals as Bhanuka Rajapaksa and Avishka Fernando failed to come to terms with the spin on a slow pitch.
Shamsi had Wanindu Hasaranga superbly caught by Aiden Markram at long-on to complete his three-wicket haul.
Pretorius bowled a succession of smart slower balls at the back end of the innings, one of which was slapped by Sri Lanka captain Dasun Shanaka to Rabada on the cover boundary as the islanders slipped to 110-6.
Pretorius claimed a third scalp when Chamika Karunaratne was caught in the deep to finish with the same analysis as Shamsi’s 3-17 from his three overs.
Both teams have a win and a loss from their two opening Super 12 matches and need to win their remaining three games to be sure of qualifying for the semi-finals.
Dushmantha Chameera claimed the wickets of both openers Reeza Hendricks and Quinton de Kock for 11 and 12 respectively.