Sri Lanka's play-off prospects ended when England beat India at Edgbaston on Sunday while the West Indies were already out of contention after losing four in a row after a confident start to the tournament.
Chasing 339 for victory, West Indies lost Sunil Ambris and Shai Hope to Sri Lanka pace spearhead Lasith Malinga's fierce spell with the new ball.
He starred in three crucial partnership, adding 61, 54 and 83 with Jason Holder (26), Carlos Brathwaite (8) and Fabian Allen (51) respectively to take West Indies close to pulling off an incredible chase.
In the match between Sri Lanka and West Indies, the latter won the toss and opted to bowl first. Thirimanne went on to finish the innings with unbeaten on 45 off 33 balls, hitting four boundaries in the process.
Three overs later, West Indies claimed their second wicket when Perera was run out at the non-striker's end, failing to make his ground after being sent back by Fernando in mix-up over a second run.
Freakish hailstorm buries Guadalajara, Mexico
Authorities estimate that 200 homes have been damaged and dozens of vehicles marooned in the city and surrounding districts. At least six neighbourhoods in the city outskirts woke up to ice pellets up to two metres deep.
Nicholas Pooran scored his first one-day worldwide century against Sri Lanka on July 1.
Fernando made promising starts in his two previous World Cup appearances, scoring 49 in the upset win over England and 30 in last Friday's loss to South Africa, but went on with it this time. His audacious strokeplay simply defined his character and brought about a refreshing change to the rickety Lankan batting that has been their downfall in the World Cup.
After this win, Sri Lanka are now placed at the sixth spot on the points table with eight points from eight matches. Their bowlers were too full on leg stump and were unable to find the right length on a pitch that was not all pace. They have included Shannon Gabriel in place of Kemar Roach.
"We have done well against India in other ICC tournaments and we have just beaten West Indies so if we can take that confidence and momentum into the next game then we can beat India again", de Silva said.
Mathews came up with an enterprising 20-ball 26 before a ideal yorker by Holder sent him back in the 40th over.