South Africa 115 for 6 (Duminy 51, Senanayake 3-14) beat Sri Lanka 103 for 9 (Sangakkara 59*, Duminy 3-18) by 12 runs
Scorecard and ball-by-ball details

Replay the manner in which South Africa were defeated four times on their tour of Sri Lanka so far and you would have expected them to lose this match as well. The top order failed, the middle order was exposed but only just hung together and the bowlers had too little to work with. But this time, they pulled off a heist despite all their deficiencies.

JP Duminy followed up his half-century with a match-winning bowling performance while Morne Morkel and Wayne Parnell finally showed capabilities of bowling at the death. Kumar Sangakkara's 59 was one of only two double-figure scores on Sri Lanka's card as the rest battled on a slow surface.

South African fans would not have expected that, after their team seemed to have lost the match before the first innings powerplay was even complete. Sri Lanka's offspinner Sachithra Senanayake plucked three wickets from a top order that has yet to find their confidence. Their bowlers, though, had theirs boosted after they defended a low total which required Sri Lanka to score just 37 runs in the last five overs.

Sri Lanka looked set to chase down the total without much fuss when they scored 13 runs in the first two overs. Kusal Perera showed attacking intent but his temperament gave way when he mis-hit Morne Morkel to point.

Dinesh Chandimal also seemed in a hurry. He hit two boundaries before bottom-edging Lonwabo Tsotsobe, after struggling with the extra bounce.

With early setbacks, Sri Lanka's seniors Tillakaratne Dilshan and Kumar Sangakkara knuckled down and tried to pick singles off Wayne Parnell and Imran Tahir. But all the patience Dilshan showed in the ODI series vanished when Duminy was introduced, as in an attempt to take the bowler on, Dilshan only managed to offer AB de Villiers a catch at long-on.

Sri Lanka needed to score 70 runs in the second-half of their innings but with the in-form Sangakkara at the crease, they would have thought it more than possible. While he found the boundary, the rest found the fielders.

Angelo Mathews gave Duminy a tame return catch and then Jeevan Mendis swept him to deep square leg the next ball. Duminy didn't complete a hat-trick but he wouldn't mind that.

Lahiru Thirimanne and Thisara Perera holed out within six balls of each other and suddenly, South Africa had the upper-hand. With 21 runs to defend off 12 balls, Parnell mixed up his pace in a double-wicket maiden and Morkel bowled a few full to ensure run-scoring opportunities were unavailable. Sangakkara hit two fours off the last over but he could not do it alone and in the end, Sri Lanka ended up with a worse batting performance than South Africa.

That hardly seemed possible after Senanayake's start. He exposed Quinton de Kock's inexperience and had the young wicket-keeper batsman playing down the wrong line to one that straightened to get him lbw.

Henry Davids also could not read Senanayake. After trying to work him to leg and push him to cover, he went for the sweep to a full delivery and was trapped in front. And then, Faf du Plessis' lean series became leaner. After constant shuffling at the crease, he tried to play inside the line of a straighter one and was bowled.

De Villiers and JP Duminy posted a small stand of 27 and Duminy took on the responsibility of anchoring the innings. He hung around for long enough to accelerate slightly and along with David Miller, helped South Africa manage 21 runs off the 16th and 17th over.

Miller became Lasith Malinga's 50th T20 victim but Duminy notched up a more favourable record. He brought up his fifty with a slog-sweep off an Ajantha Mendis full toss, which took over 1,000 T20 runs and made him South Africa's leading scorer in the format, overtaking Graeme Smith, and giving the team a morale-boosting win during a tough tour.