Scotland secured the biggest win in their cricketing history with a thrilling six-run defeat of England.
Callum MacLeod’s brilliant 140 not out took the home side to 371-5 in glorious batting conditions in Edinburgh.
Jonny Bairstow’s 54-ball century looked to have England on course until they slipped from 220-2 to 276-7.
Liam Plunkett (47 not out) and Moeen Ali (46) kept them in it, but last man Mark Wood was lbw to Safyaan Sharif from the fifth ball of the 49th over.
It is a wonderful result for Scotland, who have been improving steadily since the 2015 World Cup and were only denied a place in the 2019 tournament when rain stopped their match against West Indies in the qualifying tournament in March.
Here, against the number one ranked side in the world, the Scots gave the sort of performance that further questions the International Cricket Council’s decision to cut the World Cup to only 10 teams.
For England, so impressive in limited-overs cricket in recent years, this first defeat by Scotland can be mentioned in the same breath as the Twenty20 humblings by the Netherlands, and World Cup losses to Ireland and Bangladesh.
They must regroup for the five-match series against Australia, which begins at The Oval on Wednesday, while Scotland move on to T20s against Pakistan on Tuesday and Wednesday.
This was a magnificent occasion at the picturesque Grange ground, with a flat pitch surrounded by small boundaries and a lightning outfield.
England’s attack, without the injured Ben Stokes and Chris Woakes, looked toothless, but that is to take nothing from the impressive batting of the Scots.
Any suggestion England were incapable of pulling off their highest ODI chase was dispelled by a Bairstow innings that silenced the partisan crowd.
But England engineered their own downfall, first after Bairstow skewed to long-off, then by gifting wickets away in a middle-order collapse of five for 56.
Still, Moeen and Plunkett remained calm in a tense atmosphere in which every dot ball was cheered.
Then came the final twist. Moeen holed out to long-on, Adil Rashid was run out coming back for a second and Wood pinned by a Sharif yorker to spark joyous scenes and a celebratory pitch invasion.