Prolific opener David Warner smashed a brilliant 122 but could not claim victory for Australia as they slipped to a 10-run defeat to South Africa in their Cricket World Cup clash at Old Trafford on Saturday, leaving them facing a semi-final against England.
The result allowed India to take over at the top of the round-robin table at the end of the first stage, meaning Australia will battle the host nation at Edgbaston on Thursday, while the Indians meet New Zealand at Old Trafford on Tuesday.
Already-eliminated South Africa chose to bat and a century from captain Faf du Plessis took them to 325 for six in their 50 overs, a total boosted by Rassie van der Dussen’s well-constructed 95.
Australia were in trouble early in their innings and a hamstring injury to number three batsman Usman Khawaja saw him retire hurt, and put the rest of his tournament in jeopardy, but they rallied magnificently before being bowled out for 315 with one ball remaining.
South Africa have been poor with the bat in the tournament but found form on an excellent wicket for stroke-making and posted their highest total of the World Cup.
Du Plessis followed up his unbeaten 96 against Sri Lanka last time out with another controlled innings of 100 from 94 balls.
He put on 151 for the third wicket with Van der Dussen, who was caught on the boundary in the last delivery of the innings as he chased his maiden ODI ton.
Australia lost captain Aaron Finch (3) in the third over of their reply and were in further trouble when Khawaja hobbled off with the score on 20.
Steve Smith (7) was trapped leg before wicket by Dwaine Pretorius (2-27), before wicketkeeper Quinton de Kock effected a brilliant run-out of Marcus Stoinis (22) with a flick behind his back and then took a superb catch to remove Glenn Maxwell (12).
At that stage Australia were reeling at 119 for four, but Warner continued to score at a run a ball and got to his 17th ODI hundred with fours off successive deliveries.
He put on a brilliant 108 in 90 balls for the sixth wicket with the excellent Alex Carey (85 from 69 balls) to keep Australia in the hunt but miscued a Pretorius delivery and was superbly caught by a diving Chris Morris at mid-on.
A hobbling Khawaja (18) returned to the wicket late in the innings but, with his movement restricted, was bowled by seamer Kagiso Rabada (3-56).
Earlier Rohit Sharma became the first player to make five centuries in a single World Cup and his opening partner KL Rahul also struck a fluent century as India crushed Sri Lanka by seven wickets in their final group match at Headingley on Saturday.
India had already qualified for the last four and will finish top of the standings after Australia lost to South Africa in their last group match.
Sri Lanka, who failed to reach the semi-finals, slumped to 55-4 in the 12th over before Angelo Mathews smashed his first century in nearly two years to help them to a respectable 264-7.
Rohit and Rahul made a mincemeat of the Sri Lankan attack to add 189 runs, the highest opening stand at this World Cup, which effectively settled the match.
Captain Virat Kohli made 34 not out as India romped home with 39 balls to spare for their seventh win in nine matches.
Sri Lanka pace spearhead Lasith Malinga completed figures of 1-82 in his final World Cup match.