Sri Lanka 170 for 5 (Dickwella 68, Tahir 3-18) beat South Africa 169 for 5 (de Villiers 63) by five wickets
Scorecard and ball-by-ball details

Sri Lanka spoiled AB de Villiers' comeback by snatching the T20 series from South Africa to claim the first silverware in the country in their history. Niroshan Dickwella's career-best 68 overshadowed de Villiers' 63, in his first international outing in six months, as Sri Lanka chased down 170 with one ball remaining but it was Seekkuge Prasanna's 16-ball 37 which completed the second highest successful chase at Newlands.

South Africa were without their newest spearhead, 20-year-old Lungi Ngidi, for most of their time in the field after he bruised his hip, and he could not bowl his final two overs, but had a tardy fielding effort rather than lack of resources to blame for their inability to defend the total. They put down five catches in total and saw several more aerial chances go unclaimed to allow Sri Lanka some leeway in what was a tough task.

Still, it took cool heads for Sri Lanka's batsmen to cross the line, especially after Imran Tahir removed their stand-in captain Dinesh Chandimal early on and then removed Dickwella and Dhananjaya de Silva in the same over. Sri Lanka had to rebuild their innings twice and eventually needed 26 runs off the last two overs. Against the inexperience of Andile Phehlulwayo and debutant Dane Paterson, Prasanna and Asela Gunaratne got there to seal a memorable win.

By the time the 19th over began, Prasanna already had 23 off 10 balls - having brought the target down from a daunting 50 off 21 balls - but Gunaratne had yet to score a run and only faced one ball after Kusal Mendis was run-out in the previous over. The pair ran hard off the first and second deliveries before Prasanna advanced on a Phehlukwayo slower ball and sent it over long-on for six. He did not get hold of the next one, losing his bat as he swung, but finished the over with a ramp over the Mangaliso Mosehle's head to leave Paterson with 11 to defend off the last over.

Gunaratne took the pressure off the final passage of play with a scoop over fine leg for four and took quick singles before he swung across the line and top-edged over Mosehle to level scores. In his excitement, Gunaratne thought the match was over and grabbed a stump out of the ground in celebration only to be told he needed one run was still needed. He drove the penultimate ball through the covers and this time could keep the stump.

Having threatened through the series, with 43 in Centurion and 22 in Johannesburg, Dickwella went one better and converted his start into his first T20 half-century. He had support from Upul Tharanga, who was playing in his first T20 since the World T20 in 2012, and was aggressive from the get-go. The pair punished width early on and took on the short ball and it took a change of pace to separate them.

Tharanga lobbed a catch to mid-on off Wayne Parnell's first ball, a slower delivery, to give South Africa a breakthrough but it was when stand-in captain Dinesh Chandimal was bowled by Tahir's first delivery that Sri Lanka were under real pressure. Tahir's over went boundary-less and then a hat-trick of missed chances came off Parnell's second over, including a return catch, with Dickwella surviving two of those chances. He made South Africa pay.

He saw off Tahir and targeted Phehlukwayo at first, before switching gears and lapping Tahir but South Africa's complications came when they needed a replacement for Ngidi after he injured his hip diving at cover. Jon-Jon Smuts had to fill in but his two overs cost 22 runs as Dickwella reached fifty off 34 balls.

With five overs to go, Sri Lanka needed more than ten an over but would have been fairly comfortable with Dickwella well settled. Tahir had an over in hand, though, and appeared to have changed the game. He had Dickwella caught in the deep and de Silva stumped to turn things South Africa's way but Sri Lanka had more muscle.

In the end, South Africa might blame their middle-order problems for not posting a big enough total. They lost 4 for 28 runs in 25 balls between the 14th and 18th over, including de Villiers which may have been the difference.

South Africa trialled a new opening partner for Smuts in Reeza Hendricks and it proved a good decision. While Smuts continued to show nothing more than glimpses of the potential that took him to the top of the domestic T20 competition run-charts, Hendricks had the composure for a longer stay and formed one half of the hosts' major partnership on the night

After Smuts was given out lbw, Hendricks was joined by de Villiers and was happy to cede control to the senior man, but not before a third perfectly timed offside drive to the end the PowerPlay strongly.

De Villiers initially played within himself before giving making room to drive through point for his first boundary. He did not focus on finding the rope too many more times early on, though, and strike-rotation with a partner who was as speedy as him formed the foundation of their scoring. Every single was cheered loudly, twos and a solitary three were even more appreciated but there was no doubt the crowd was expecting more. When de Villiers danced down the track to meet a Lakshan Sandakan delivery on the full and send it straight back over his head for six, Newlands erupted. Their superstar was back.

A scoop off Gunaratne saw de Villiers overtake Hendricks before the latter was stumped. Hendricks will not be happy with his carelessness when he dragged his foot out against Sandakan after the ball spun across him and he failed to push his foot behind the line. Chandimal needed two attempts to complete the stumping and, still, Hendricks did not inch further back.

Despite that wicket bringing South Africa's most dangerous hitter, David Miller, to the crease, Sri Lanka had created an opening to claw their way back. Miller, Farhaan Behardien and de Villiers all departed and South Africa entered the final two overs on 141 for 5 without one of their regular finishers on hand. Nuwan Kulasekara did an exceptional job in his final two overs which only cost 11 and removed de Villiers.

Mosehle took the opportunity to show what he could do with a stunning cameo. He plundered three sixes off the first four balls in the last over, which cost Isuru Udana 21, and took South Africa's total over 160 but it was not enough.