West Indies fell 23 runs short of a record World Cup run chase despite a magnificent 118 from Nicholas Pooran against Sri Lanka at Chester-le-Street.
Set 339 after a maiden century from Sri Lanka's Avishka Fernando, the Windies were 84-4 in the 18th over.
Pooran played some swashbuckling shots, ably supported by Fabian Allen (51).
Yet with 31 needed from the last three overs, Pooran was caught behind as West Indies closed on 315-9, Lasith Malinga claiming 3-55.
Both teams began the match knowing they could not qualify for the semi-finals but produced a classic encounter.
When Carlos Brathwaite was the sixth West Indies wicket to fall, run out at the non-striker's end by the slightest of deflections, 140 runs were still needed.
Allen reached his half-century from just 30 balls to add 83 inside 10 overs with Pooran - but he refused his partner's call for a single and was run out with 57 required from 35 balls.
Sri Lanka's pace spearhead Malinga, who earlier had two catches dropped off his bowling in one over, then saw Pooran offer a straightforward chance to long-off on 108, but substitute fielder Thisara Perera misjudged it horrendously and it went for four.
However, former Sri Lanka skipper Angelo Mathews was introduced for his first bowl of the tournament and his opening delivery - an inviting ball wide of off stump - was edged to the keeper by Pooran.
It was another narrow defeat for West Indies, who lost by five runs to New Zealand after centurion Brathwaite attempted to win the match with a six and was caught on the boundary.
They still have only one victory in the tournament, the emphatic seven-wicket rout of Pakistan in their opening match, who they bowled out for 105.
The hostile pace bowling unit that decimated Pakistan and left Australia 38-4 in match two failed to fire on Monday - and there were misfields, dropped catches and accusatory gestures.
Fernando came to the crease in the 16th over following a fine opening stand of 93 between left-handers Dimuth Karunaratne and Kusal Perera.
Slightly built, Fernando favoured precise strokeplay over power in the mould of Sri Lanka legend Mahela Jayawardene, but he was still able to dispatch Sheldon Cottrell for two sixes into the leg side, one measured at 83 metres.
The Windies were guilty of five no-balls, the highest in an innings at this tournament and it was a mammoth overstep from Oshane Thomas that allowed Lahiru Thirimanne a reprieve after he clipped straight to mid-wicket.
Thirimanne advanced down the wicket to thump successive boundaries in the next over as the Sri Lanka middle order all contributed to an impressive total - their previous highest in the competition had been 247 in an 87-run defeat by Australia at The Oval.
However, after Malinga struck twice in his opening three overs, it was the brilliance of Pooran that looked set to rescue the mercurial Windies, who had Barbadian pop star Rihanna cheering them on enthusiastically from the stands.
Pooran, the stylish Trinidadian left-hander, reached his fifty with a six, and with Allen also striking the ball cleanly for his maiden half-century, West Indies looked favourites as Sri Lanka's attack began to wilt and show a lack of depth.
But the pivotal moment came when Mathews, in his first one-day international spell for 561 days, lured Pooran into a full-blooded cut that, for once, was not struck sweetly and the ball was gleefully pouched behind the stumps.
Sri Lanka will surely rue two washed-out matches earlier in the tournament, because even if they beat India in their final match and reach 10 points, they would not go through as other teams have more wins.
"Angelo put his hands up and said: 'OK I will bowl two overs.' He has that confidence. He did the job. I don't think he is going to bowl much more, but if it is a crucial time he might bowl a couple of overs."
West Indies skipper Jason Holder: "We started slowly out of the blocks; we gave up a lot of runs in the field and that really hurts you. We were sloppy. We have to be better. This entire tournament we have let key moments slip.
"I felt 338 was about par, it was free-scoring. It was a matter of us getting in and playing some shots. Pooran had an outstanding knock. He gave himself a chance and went deep. The run-outs were crucial. We were one or two partnerships away."
Source: BBC Sports