First paceman Lasith Malinga took three for 50 as Sri Lanka restricted England to 219 all out.
Then, after Sri Lanka had wobbled at 62 for three, fifties from Mahela Jayawardene (53) and Lahiru Thirimanne (60 not out), together with captain Angelo Mathews's 42 not out off 34 balls, saw the tourists home with 10 balls to spare.
But there was a controversial moment during England's innings when Sachithra Senanayake ran out Jos Buttler as the non-striker backed up.
Mathews upheld the appeal for a perfectly legitimate dismissal and Buttler, whose blistering 121 had so nearly taken England to victory in the fourth ODI at Lord's, was out for 21.
"You would have to ask Angelo Mathews," said Cook when asked for his view of the run out during the presentation ceremony.
"We were obviously disappointed.
buy stromectol online buy stromectol online no prescription
I hope I wouldn't do it.
"You don't know in the spur of the moment how you would handle it.
"
However, Mathews insisted: "He was taking starts, not only this game but in the last