David Warner marked his first game against South Africa since a 12 month- ball tampering ban with his third hundred of the tournament but this was not enough to prevent Australia from suffering their second loss in the 10-team group stage.
Holding out on the penultimate ball of the game against South Africa meant Australia who had already qualified for the semi-finals wont finish on the top spot as India leapfrogged them to take the top spot after a 7 wicket victory over Sri Lanka on Saturday courtesy centuries from the openers Rohit Sharma and KL Rahul.
Had Australia defeated South Africa at Old Trafford, they would have faced New Zealand on Tuesday at Old Trafford, Manchester.
But instead will face arch-rivals England on Thursday at Edgbaston, Birmingham.
The finals will be played on the 14th of July at Lords.
A hundred from Warner and a brisk fifty from the Australian vice captain Alex Carey got them within sight of a stiff target of 326 during a fifth wicket partnership of 108.
Australia were struggling at 119 for four and Warner could only watch as wickets fell early against a Proteas side whose hope for qualifying for the semi-finals had disappeared.
Warner held his ground by becoming the third batsman to score 600 runs in the tournament. He eventually got out to Dwaine Pretorius and was well caught by Chris Morris at Mid-on.
Alex Carey scored his career best ODI- knock before he carved Morris to Aiden Markram leaving Australia at 275/7 in the 46th over. Usman Khawaja then returned after retiring hurt earlier in the innings but was eventually bowled by Kagiso Rabada .
Andile Phehlukwayo then defended 18 off the last over helping South Africa win the game by 10 runs.
Earlier a century from Faf du Plessis and a gritty 95 by Rassie van der Dussen helped the South Africans reach 325.