JP Duminy starred with bat and ball as South Africa opened their three-match Twenty20 series against Sri Lanka with a 12-run victory in Colombo.
The all-rounder scored 51 as South Africa recorded 115 for six before going on to take three wickets when Sri Lanka fell short on 103 for nine.
Off-spinner Sachithra Senanayake struck three times in as many overs to remove Quinton de Kock, Henry Davids and Francois du Plessis to reduce South Africa to 23 for three.
But after AB de Villiers was dismissed by Angelo Mathews with the score on 50 for four, Duminy and David Miller put on 56 for the fifth wicket before the latter departed for 25. Duminy's innings ended from the penultimate ball as he fell to Ajantha Mendis.
After a steady start to Sri Lanka's chase, Kusal Perera was ousted by Morne Morkel in the fourth over for 11. Kumar Sangakkara shone with an unbeaten 59, but he was the only other player to reach double figures as the wickets started to tumble.
Duminy accounted for Dilshan and then removed Mathews and Jeevan Mendis in successive balls, while Lahiru Thirimanne could score just five prior to being caught by de Villiers on the long-on boundary.
Sangakkara hammered two fours off Morkel in the final over to leave Sri Lanka needing 13 off three balls, yet the paceman recovered with a trio of dot balls to secure victory.