England defeated West Indies in the first One Day International (ODI) match of their series by seven wickets thanks to new inclusion Jonny Bairstow's century.
The result puts the Windies at 78 points in the ICC ODI rankings which means they will miss out on automatic qualification no matter how their remaining results go against the hosts.
The visitors were already at risk of missing out on automatic qualification and required a 4-0 or 5-0 win over England to stand any chance of overtaking Sri Lanka.
However, their loss means Sri Lanka, 86 points, are now the the last team to automatically qualify for the World Cup to be hosted by England.
They will join Australia, Bangladesh, England, India, New Zealand, Pakistan and South Africa as the only confirmed nations to take part in the event.
"It's no secret that we have been going through a tough time, but I want to say a big, big thank you to our fans who've kept faith with us when things looked bleak," Sri Lanka ODI captain Upul Tharanga said, as quoted on ESPN.
"ICC events have always brought out the magic in Sri Lanka cricket, and I look forward to proving that once again. We have a clear plan toward the World Cup, and we will work hard at achieving each step.
"As we say in the dressing room - Little 'w's add up to make the big 'W' - so that's what we'll be focusing on and I know you will see Sri Lanka's special brand of cricket out there once again soon."
As for West Indies, they will take part in a 10-team qualifier in 2018 alongside Afghanistan, Zimbabwe and Ireland, with the top two teams completing the World Cup line-up.
The 2019 World Cup will take place between 30 May and 15 July as reigning champions Australia will look to defend their crown.
For now, the focus will be on the remaining series matches as both sides will face each other in Nottingham for the second ODI at Trent Bridge on Thursday (21 September).