|ICC World Twenty20, Chittagong|
|S Africa 196-5 (20 overs) beat England 193-7 (20 overs) by three runs|
England were knocked out of the World Twenty20 in the group stage as an AB de Villiers-inspired South Africa booked their place in the semi-finals.
De Villiers, standing in as captain for the banned Faf du Plessis, hit 69 off 28 balls as the Proteas scored 55 in the last three overs to reach 196-5.
Alex Hales (38) gave England a good start, but three quick wickets for Wayne Parnell turned the tide.
Spinner Imran Tahir then took 2-27 as England fell three runs short on 193-7.
England's final match against the Netherlands on Monday is now academic, while Sri Lanka and New Zealand will play off for the second qualifying spot from Group One.
Remarkably, at 144-5 after 16 overs, England were actually 13 runs ahead of where South Africa had been at the same point.
But the Proteas' innings was given a sudden catalyst by the brilliant De Villiers and a wayward Jade Dernbach, who conceded 26 runs off the 18th over of the innings.
A further 29 followed off the final 12 balls as South Africa posted the highest score of the tournament so far and set England a target they were always unlikely to reach.
That they came relatively close owed much to a spirited late 31 off 18 balls by Ravi Bopara and a six off the final ball of the day from Tim Bresnan when the match - and England's chances of reaching the last four - had already gone.
England lost to New Zealand on the Duckworth-Lewis method in their first match but rebounded to beat Sri Lanka as Hales hit a match-winning hundred.
But the defeat by South Africa rounds off a miserable winter that featured heavy series defeats in all three formats in Australia and an indifferent limited-overs tour of the West Indies.
Put in to bat under floodlights that twice failed in the first hour, causing short delays to proceedings, South Africa raced to 85-0 in their first 10 overs as a pumped-up Hasim Amla made his first T20 international fifty.
But England fought back gamely with 3-36 in the next five overs as Amla (56), Quinton de Kock (29) and JP Duminy (5) all perished, the latter to a comical run-out when his bat slipped out of his hand as he dashed for a second run.
De Villiers wrenched the game back in his team's favour with an extraordinary display. He reverse swept a 92mph delivery from Chris Jordan and somehow heaved a low full toss from Bresnan over midwicket for six on his way to fifty off 23 deliveries.
And there was more to come. Two sixes were bludgeoned off the unfortunate Dernbach, who was also hit for two fours by David Miller and sent down two wides and a no-ball in a disastrous 18th over as South Africa gave their score a crucial late boost.
England scored 62-1 in the six-over powerplay but lost momentum when Hales and Moeen Ali were dismissed in successive balls by Parnell, who had been drafted in for Lonwabo Tsotsobe.
Eoin Morgan nicked Tahir to the keeper for 14 off 14 balls and Jos Buttler was caught reverse-sweeping for 34.
Bopara just about kept the game alive with three fours and a six, but when he holed out to the first ball of the final over the game was up.