Kumar Sangakkara hit 86 as Sri Lanka squeezed past England with six wickets and two balls to spare in the fourth one-day international to take a 3-1 lead in the seven-match series.
James Taylor missed a maiden one-day century by 10 runs as England, electing to take first strike, scored 265 before they were all out off the last ball of their 50 overs in Colombo.
But Sangakkara's 90th one-day half-century laid the foundation that enabled Sri Lanka to pass the target in the day game at Premadasa stadium on Sunday.
The left-hander put on 96 for the third wicket with fellow veteran Mahela Jayawardene (44) and 49 for the fourth with skipper Angelo Mathews.
Sangakkara was dismissed in the 42nd over when 52 was still needed, but the fifth-wicket pair of Mathews (51 not out) and Lahiru Thirimanne [19 not out] carried the hosts home.
England were left to rue bowling 12 wides in what eventually turned out to be a close game. Steven Finn, Chris Jordan and Joe Root sent down three each.
Taylor, given a chance to play his third one-day match only because skipper Alastair Cook was serving a one-game suspension due to slow over-rates, seized the chance with delectable strokeplay.
The 24-year-old hit six boundaries and two sixes in his 90 before holing out in the deep off Ajantha Mendis after suffering cramps caused by stifling heat and humidity.
Eoin Morgan, leading England in Cook's absence, struck 62 off 47 balls.
Morgan smashed 18 off the final over bowled by Tillakaratne Dilshan before he was dismissed off the last ball of the innings.
Spinners Dilshan, Mendis and Rangana Herath picked up three wickets each. The fifth international will be played in Pallekele on Wednesday.
The series gives both teams a chance to build for the World Cup to be held in Australia and New Zealand in February-March.