England survived a superb Sri Lanka fightback to win the fifth one-day international by 16 runs at Old Trafford and take the series 3-2.
When England posted 268-9 on what was expected to be a difficult batting track, it made them big favourites.
Sri Lanka slipped to 29-3 in reply but a brilliant partnership between Jeevan Mendis and Angelo Mathews threatened to turn the game on its head.
But Mendis fell for 48 and Mathews 62 as England edged to victory.
It was a gripping finale to a series which had seen both sides pick up a brace of easy wins apiece to leave matters tied at 2-2 going into the game at a new-look Old Trafford.
The square has been rotated by 90 degrees as part of the redevelopment of the ground and with it due to be properly relaid this winter the wicket was expected to be slow and grippy, favouring Sri Lanka's spinners.
In the event as the game wore on it became increasingly even paced and Mendis and Mathews made batting look easy before the high run rate, resulting from the failure of the tourists' top order, finally took its toll.
England won the toss and got off to a flyer as Craig Kieswetter and Alastair Cook rattled along at more than seven an over until the batting power play was taken in the 13th over.
Then, as happens so often with England, there was a flurry of wickets rather than a continuing flow of runs.
Cook advanced down the pitch and was comfortably stumped as Suraj Randiv, who was to end with 5-42, found substantial turn, and four balls later Kieswetter was bowled by Dhammika Prasad for a run-a-ball 43.
When Kevin Pietersen soon followed, England's promising start was in danger of going up in smoke, but Jonathan Trott and Eoin Morgan set about re-establishing control.
They put on an untroubled partnership of 118 off 124 balls until Morgan advanced down the pitch and was stumped for a 60-ball 57 to spark another clatter of wickets.
Trott's immensely composed innings of 72 off 87 balls then came to an end as he bottom edged the ball on to his stumps via his pads.
England threatened to subside towards the end of their innings, but a late flurry from Anderson lifted them to 268-9, a total TMS analyst Michael Vaughan described as "about 30 or 40 above par".
Sri Lanka needed a solid start but they were soon in trouble as Tim Bresnan made early inroads, removing Dimuth Karunaratne and the dangerous Tillakaratne Dilshan.
When Mahela Jayawardene lofted a drive off Jimmy Anderson to an exultant Cook at mid-off, the tourists were 29-3.
With well over 200 required from just over 40 overs they needed a major partnership to have any chance and Dinesh Chandimal and Kumar Sangakkara set about repairing the damage.
Chandimal, 21, was the aggressor, but he chanced his arm against Swann once too often and was stumped for 54, having put on 94 with Sangakkara.
When Sangakkara chopped Bresnan on to his stumps for 48 three overs later the writing was on the wall, but Mendis and Matthews kept the tourists alive with a battling partnership.
Entering the final 10 overs they needed 73 but Mendis finally holed out off Samit Patel in the 46th over.
That just left Mathews and the tail. With wickets tumbling the all-rounder decided he had to try and win it on his own.
A couple of glorious fours over extra cover had both sets of fans on the edge of their seats but with two overs remaining Jade Dernbach produced a sublime slower ball which Mathews could only spoon to third man, and with him went Sri Lanka's hopes.