Day 23 at the World Cup: Lasith Malinga and Angelo Mathews played key roles in Sri Lanka's stunning 20-run World Cup win over England that revived the race for semi-final berths at Headingley on Friday.
England were all but out of the match after slumping to 186-9 as they chased 233 for victory.
Ben Stokes' blistering 82 not out off 89 balls, including seven fours and fours sixes, got them to within sight of their target.
But Stokes' gamble on giving Durham team-mate Mark Wood a ball to face at the end of a Nuwan Pradeep over backfired when the No.11 was caught behind as Sri Lanka won with three overs to spare.
"We lost it probably more so with the bat than with the ball. There was lack of substantial partnerships. A couple of individual performances nearly got us over the line," England captain Eoin Morgan said.
"Sri Lanka deserved it. Even if we had nicked it then it would have been us robbing the game.
"It's frustrating but we are going to lose games. They are all tough matches."
Victory would have seen hosts England, bidding to win the World Cup for the first time, go top of the 10-team table.
But instead their second surprise loss of the round-robin group stage after a 14-run defeat by Pakistan, left them in third place, with Sri Lanka now just two points adrift of the pre-tournament favourites.
The top four at the end of the first phase qualify for the semi-finals, with England's next match against arch rivals Australia -- the table-toppers and reigning champions -- at Lord's on Tuesday now even more important to their hopes of a last four place.
"It's a long tournament and there are huge opportunities in every game. Australia is always a match you look to first in the World Cup fixtures," Morgan said.
Earlier, Mathews' painstaking 85 not out of 115 balls, with just five fours, helped Sri Lanka recover from a top-order collapse to finish on 232-9.
That seemed a below par total but with paceman Malinga taking 4-43 and off-spinner Dhananjaya de Silva following up with three wickets in quick succession, it proved more than enough as Sri Lanka enjoyed another memorable day at Headingley -- the ground where they sealed their first Test series win in England five years ago.
"It was a close one, we were under pressure but it was team-work in the end, all the batters and bowlers did great work," Sri Lanka captain Dimuth Karunaratne said.
"With a score on the board the bowlers knew what to do on this wicket. The (Joe) Root wicket was the turning point."
Malinga, renowned for his unorthodox 'slingshot' action dismissed Jonny Bairstow for a golden duck.
James Vince (14), deputising for the injured Jason Roy, then fell in familiar fashion when an edged drive off Malinga was caught by Mendis at slip.
Morgan, fresh from his one-day international record 17 sixes against Afghanistan, made a cautious 21, featuring a mere two fours, before Isuru Udana held a sharp return catch to dismiss the Dubliner.
Root made a patient 57 off 89 balls featuring just three fours.
But a fourth-wicket stand of 54 with Stokes ended when Root was caught behind down the legside off Malinga, who then produced a trademark toe-crushing yorker to have dangerman Jos Buttler lbw.
Stokes badly needed someone to stay with him. But he could only watch as de Silva took three wickets for three runs in nine balls.
Moeen Ali marked his 100th one-day international by hitting a six, only to hole out irresponsibly off the next ball from de Silva trying to repeat the shot.
In a furious assault by Stokes, the all-rounder hit two sixes in as many balls off Udana, but Wood was the last man to fall as England's chase fell short on 212.
Earlier, England fast bowler Jofra Archer took 3-52 to join Australia's Mitchell Starc as the leading bowler at this World Cup with 15 wickets.
With inputs from AFP.