Avishka Fernando's 104 trumped Nicholas Pooran's 118 as Sri Lanka held on for a tense 23-run victory over the West Indies in front of watching pop star Rihanna at Chester-le-Street.
Barbadian songstress Rihanna was a surprise spectator in the north-east and her presence brought out the best of Pooran, who nearly doubled his previous highest one-day international score of 63 with a fearless innings.
His dismissal with 31 still required ended the Windies' hopes of a World Cup record chase, while Fernando's maiden ODI century underpinned Sri Lanka's 338 for six in what was officially the tournament's first dead rubber.
England's victory over India on Sunday had the knock-on effect of ending Sri Lanka's semi-final hopes though there was no palpable disappointment.
Fernando, in particular, rose to the occasion in what could be a breakthrough innings in his ninth ODI, becoming Sri Lanka's youngest World Cup centurion following a fantastic 104 from 103 deliveries.
When the Windies slipped to 84 for four in reply, there seemed to be no way back, but Pooran's pyrotechnics, with his innings containing 11 fours and four sixes, kept the game in the balance.
He was ruthless with anything leg-side and had a capable foil in Fabian Allen as the pair put on 83 for the seventh wicket.
Allen sacrificed himself after a quickfire 51 from 32 balls when Pooran was on 99, the third run out of the Windies' innings.
Pooran reached three figures for the first time in an international shirt off 92 balls but he was given a life on 108 when Thisara Perera misjudged a catch in the deep.
However, Angelo Mathews – brought on to bowl in an ODI for the first time since December 2017 – ended Pooran's stay, the batsman getting a thin edge to the wicketkeeper, after which the Windies charge fizzled out.
Their target may not have been insurmountable had they not delivered a lacklustre display in the field.
Dimuth Karunaratne and Kusal Perera laid an ideal platform for Sri Lanka, the openers rarely troubled in a 93-run union as clouds gave way to sunny skies.
Perera got a leading edge which dropped short of the cover fielder but was otherwise dynamic in a 38-ball fifty, shortly after which Karunaratne wafted at a wider delivery and toe-edged Jason Holder behind for 32.
The Windies were fraying after Nicholas Pooran spilled a simple chance in the deep when Perera was on 59 but the opener would add only five more runs before being run out, sent back by Fernando after coming back for a second.
Fernando had caught the eye in an effervescent 49 from 39 balls against England, while he joint top-scored with 30 in last Friday's defeat to South Africa, on both occasions giving away his wicket when set.
There would be no wastefulness on this occasion, the youngster enjoying moments of fortune, with an outside edge off the expensive Shannon Gabriel not carrying to wicketkeeper Shai Hope.
Otherwise, he was the mainstay of the innings. An 85-run stand with Kusal Mendis (39) was ended by a sublime return catch off Fabian Allen while Angelo Mathews' assertive 26 was halted by a Holder yorker.
The Windies' misery was encapsulated when Lahiru Thirimanne flicked to midwicket off Oshane Thomas, only for the umpire to immediately signal a no-ball. Thirimanne would go on to contribute an important 45 from 33 balls.
Fernando deposited Sheldon Cottrell for six once more before some hard running took him to three figures for the first time in Sri Lanka colours at exactly a run a ball.
Cottrell would have a measure of revenge, belatedly saluting Fernando after he holed out to long-off, but Sri Lanka's total seemed formidable when Lasith Malinga accounted for Sunil Ambris and Shai Hope.
Chris Gayle, potentially batting for the penultimate time for the Windies in England, was becalmed as both he and Shimron Hetmyer were dropped in the same Malinga over.
Gayle was warming to his task when he belted Kasun Rajitha for two sixes but the seamer would have the last laugh, the Windies powerhouse top-edging high into the air and Jeffrey Vandersay taking a steepler at short third man.
When Shimron Hetmyer was ran out, they were staring down the barrel but Pooran brought the game to life, only to fall at the death.