The Teams: (JPN/Agencies)
Electing to bat, Sri Lanka posted a challenging 165 for seven in 20 overs, riding on a 40-ball 61 by Perera and then restricted South Africa to 160 for eight, thanks to some fine bowling towards the end.
South Africa seemed to be cruising towards the target of 166 as they required 19 runs from the last two overs, but Sri Lankan pacers Nuwan Kulasekara and Lasith Malinga choked the Protea batsmen with their superb bowling.
South Africa needed 15 runs from the last over bowled by Malinga and there was still hope for a win as David Miller (19) was still batting. But, they could not hold on to their nerves and two run-outs in the last over, including that of Miller, sealed the match in favour of Sri Lanka.
South Africa's run chase was built on a 60-run second-wicket stand between opener Hashim Amla (23) and top-scorer J P Duminy (39) to find themselves in a strong position at 75 for one at the halfway mark only to fritter away the advantage in the next 10 overs.
Opener Quinton de Kock (25), A B de Villiers (24), who stood in as captain in place of an injured Faf du Plessis, made useful contributions but for a lost cause.
For Sri Lanka, off-spinner Sachithra Senanayake grabbed two wickets for 22 runs while Kulasekara, Angelo Mathews, Malinga and Ajantha Mendis chipped in with a wicket apiece.
South Africa: AB de Villiers (capt.), Quinton de Kock (wk), Hashim Amla, JP Duminy, David Miller, Farhaan Behardien, Albie Morkel, Dale Steyn, Morne Morkel, Lonwabe Tsotsobe, Imran Tahir.
Sri Lanka: Dinesh Chandimal (cap.t), Kusal Perera, Tillakaratne Dilshan, Mahela Jayawardene, Kumar Sangakkara (wk), Angelo Mathews, Thisara Perera, Nuwan Kulasekara, Sachithra Senanayake, Ajantha Mendis, Lasith Malinga.