Rassie van der Dussen smashed an unbeaten 94 as South Africa beat England by 10 runs but failed to qualify for the semi-finals of the Twenty20 World Cup on Saturday.
Group 1 winners England and Australia, who beat West Indies in the first match of the day, made the final four from the six-team pool.
South Africa posted 189 for two after Van de Dussen smashed six sixes in his 60-ball knock but needed to limit England to 131 or fewer to edge out Australia on net run-rate.
England, who topped the group when they passed 109, finished on 179-8 after a hat-trick by Kagiso Rabada in the final over. It was England's first loss in five matches.
Van der Dussen and Aiden Markram, who hit 52 off 25 balls, put on an unbeaten attacking partnership of 103 for the third wicket to give their team a challenging total.
England elected to field first and Moeen Ali struck early when he bowled Reeza Hendricks for two.
Quinton de Kock and Van der Dussen rebuilt the innings with their second-wicket stand of 71.
Adil Rashid broke the stand as he sent back De Kock out for 34 with his leg spin.
But Van der Dussen stood firm and mixed the right dose of caution and aggression to reach his half-century in 37 balls.
He then combined with Markram to take the assault to the bowlers. The pair attacked Chris Woakes in his fourth over - the 16th of the innings, hitting three sixes between them to add 21 runs.
Markram reached his fifty off 24 balls with a six off Chris Jordan. He hit two fours and four sixes.
In reply, England started well with Jason Roy and Jos Buttler hitting boundaries in the first four overs.
But Roy suffered a calf injury issue while taking a run with Buttler and had to be helped off the field.
South Africa seized the opportunity and Anrich Nortje send back Buttler, for 26, in the next over. Then Tabraiz Shamsi trapped Jonny Bairstow lbw for one.
Moeen, who struck 37 off 27 balls, and Dawid Malan hit back in a partnership of 51 but Shamsi once again put the brakes.
Moeen hit Shamsi for a towering six but got out next ball attempting another big one which instead went straight into the hands of David Miller.
Malan kept up the attack with Liam Livingston, who hit Rabada for three straight sixes, to keep the chase on track despite losing his partner in the next over.
But Livingstone fell for 28 and South African bowlers took charge. Rabada sent back Chris Woakes, skipper Eoin Morgan and Chris Jordan for the tournament's third hat-trick.