Sri Lanka 232 for 9 (Mathews 85*, Avishka 49, Kusal Mendis 46, Wood 3-40, Archer 3-52) beat England 212 (Stokes 82*, Root 57, Malinga 4-43, Dhananjaya 3-32) by 20 runs
Lasith Malinga conjured a vintage spell, part-time offspinner Dhananjaya de Silva struck three times in nine balls, Angelo Mathews scored a stubborn 85 not out, and Avishka Fernando made a rollicking 49 to shock tournament favourites England and give Sri Lanka enough reason to dream of a spot in the semi-finals.
There were other heroes as well for Sri Lanka. Nuwan Pradeep bowled some mean inswingers with the new ball and then returned for the last over to have No. 11 Mark Wood feathering behind to deny Ben Stokes, who remained unbeaten - and heartbroken - on 82 off 89 balls. Isuru Udana backed up his excellent pace variations with two sharp catches - one off his own bowling and the other at the edge of the boundary. Kusal Mendis (46), like Mathews, had produced his highest score of the tournament to haul Sri Lanka to a scrappy 232 for 9. All of this resulted in Sri Lanka admirably defending that meagre total against a mighty England side that had topped 300 in eight of their last nine ODI innings. This, despite some late monster blows from Stokes.
Watch on Hotstar (India only): Mathews' fighting 85 not out
He threatened a jailbreak even after England were reduced to 186 for 9 in the 44th over. He farmed the strike and teed off, violently carting Udana for back-to-back sixes and then hitting the returning Pradeep for back-to-back fours. Stokes found a single off the fifth ball of the 47th over and Wood needed to see off just one ball. However, it wasn't to be as Pradeep's near-perfect full ball in the channel grazed the thinnest of outside edges and capped a remarkable comeback for the ragtag, seemingly down-and-out team.
Malinga had struck with the second ball of the chase to pin local lad Jonny Bairstow lbw for a duck and, not much later, sent James Vince back caught at slip. He would return to whip up some old magic, dismissing the other local boy Joe Root for 57 and Jos Buttler for 10 in successive overs. While Root was late onto a glance and was snaffled down the leg side, the ball that bested Buttler was a Malinga special: a dipping leg-stump yorker that swooped under his bat and had him lbw.
Just as Sri Lanka were ramping up the pressure on England, Jeevan Mendis bowled a half-volley and a dirty long-hop that was smoked into the stands by Stokes. Enter Dhananjaya. Exit Moeen. The batsman had just aerially slog-swept an offbreak just away from the reach of deep midwicket, but he still ventured another big blow off the next ball and picked out Udana at long-off for 16. Then, in his next over, Dhananjaya took down both Chris Woakes and Adil Rashid to leave England at 178 for 8. It became 186 for 9 when Udana tricked Jofra Archer with his back-of-the-hand variation.
Stokes then went bang, but Wood, who had hoped at the halfway mark that England might not need him with the bat, couldn't hang on with him. Had he safely negotiated that ball from Pradeep, England would have only had to deal with the change bowlers, with Malinga having bowled out too.
An upset did not seem likely when Root was unflappable in the early half of the chase, playing percentage shots on a slow, grippy Headingley pitch. He got cracking with a serene punch behind point, but Malinga and Pradeep didn't allow him to keep going with similar fluency. Root, though, soldiered to his fifth fifty-plus score in six innings this World Cup. However, it was his dismissal that triggered a full-blown collapse.
The sun was shining in its full glory in the morning, and Avishka played more glorious back-foot drives and pulls that had former Sri Lankan stylist Kumar Sangakarra gushing, "He's got timing, this boy!" on TV commentary. Archer was swatted so far into the stands beyond square leg that the ball bounced off a railing and disappeared out of the ground. All told, Avishka took Archer for 24 off 15 balls. However, when Wood dug one short and wide outside off, he neither played an upper-cut nor a ramp and wound up simply gliding the ball into the lap of deep third man.
Mathews and Kusal Mendis then got together for a 71-run stand - the highest in the game. Mathews took 13 balls to get off the mark and 39 to find the boundary, but Kusal Mendis scored at a brisker clip at the other end as they kept Moeen and Rashid at bay until the 30th over. Rashid, who is nursing a shoulder injury and taking injections for it, suddenly rediscovered some zip and removed Kusal Mendis and Jeevan Mendis off successive balls to reduce Sri Lanka to 133 for 5.
With the innings spiralling out of control, Mathews adopted a more vigilant approach and tightened up further to give Sri Lanka a shot at batting out their 50 overs. Archer and Wood's extra pace made light work of the lower order, but they could not find a way past Mathews.
He tiptoed to an 84-ball half-century - the joint-slowest in this tournament alongside Afghanistan's Hashmatullah Shahidi's effort. But, it wasn't until the last over of the innings that Mathews unleashed a shot in anger. His lusty leg-side club off Archer helped Sri Lanka reach 232, which proved enough in the end.
Deivarayan Muthu is a sub-editor at ESPNcricinfo