India finished top of the World Cup group table with a seven-wicket win against Sri Lanka.
With Australia losing to South Africa by 10 runs, India stayed above them and will play New Zealand in the semi-final at Old Trafford on Tuesday.
Rohit Sharma became the first man to score five centuries in a single World Cup as India chased down 265 with 6.3 overs to spare at Headingley.
Angelo Mathews made 113 as Sri Lanka recovered from 55-4 to post 264-7.
Australia needed 326 to beat South Africa at Old Trafford and by falling short they will play England in the second semi-final at Edgbaston on Thursday.
England had been expecting to face another meeting with India at Edgbaston in the last four, but may be happy to avoid Rohit for as long as possible in such spectacularly prolific form.
Playing his 16th World Cup match, Rohit 32, reached three figures in 92 balls and equalled the record of six World Cup centuries overall, held by legendary compatriot Sachin Tendulkar, who played 44 innings in the event.
He now has 647 runs in this year's tournament and needs only 27 more to eclipse another of Tendulkar's World Cup landmarks, the 673 he scored in the 2003 competition.
With KL Rahul, who made 111, they put on 189 for the highest opening stand in this year's competition, eclipsing their own 180 against Bangladesh on Tuesday.
The right-handed pair hit nine boundaries in the opening six overs as India took control of the chase from the start. The only surprise was Rohit driving straight to mid-off in the 31st over, having completed his 27th ODI hundred in his 214th match.
In his World Cup finale, Sri Lanka pace spearhead Lasith Malinga, who played in both the 2007 and 2011 finals, claimed the wicket of Rahul in the 41st over with a trademark surprise bouncer.
It took the 35-year-old above Wasim Akram into third place in World Cup wicket-taking history with 56, behind only Muttiah Muralitharan and Glenn McGrath.
The inconsistent Sri Lankans, who were bowled out for 136 by New Zealand but went on to beat favourites England, played plenty of attacking strokes but the loss of their fourth wicket in only the 12th over meant a rebuilding operation was essential and Mathews calmly recorded a century stand in 141 balls with Lahiru Thirimanne (53).
Pace bowler Jasprit Bumrah impressed again after Sri Lanka opted to bat, taking 2-5 in his opening 19 deliveries and the ever-assured former India skipper MS Dhoni was involved in the first four dismissals with some neat glovework.
Mathews was reprieved on 61 as Bhuvneshwar Kumar, having got both hands to the chance coming in from long-on, could not hold on with the score on 169-4.
It was the second catch put down by India, with Kuldeep Yadav and Hardik Pandya - who went on to take a superb catch diving forward to end the innings - almost colliding in pursuit of a lofted drive from Kusal Perera.
The powerfully built Mathews capitalised and the second fifty of his 115-ball century took only 41 deliveries.
It was his third ODI century, all of which have been against India, but Bumrah returned to dismiss him in the penultimate over and only three fours were scored off the wily India strike bowler in his 10-over spell of 3-37.
India captain Virat Kohli: "We wanted to play good cricket but we didn't expect to do this well heading in to the semis. That's what hard work gets you. I am really proud of this team as a captain, they are amazing people.
"More or less everything is set for the semis but we don't want to be one-dimensional. We need balance in the side. We are very happy."
Rohit Sharma: "I have learned from my mistakes in the past. I don't go in to a match thinking of hundreds. Every day is a new day."
Sri Lanka skipper Dimuth Karunaratne: "After this World Cup we have to go have a think about what we have to do and what we got wrong.
"We will talk to the selectors and find some new talent. Four years is a long period.
"We will find guys who can play a good role for Sri Lanka. We will search for some talents."
On Malinga: "Sri Lanka cricket will miss him. He has done a lot of things for Sri Lanka. A wonderful effort. He was the man behind the World Cups. We will miss him but everyone has to end their chapter."
Source: BBB Sports