England went down to their worst defeat under Brendon McCullum as Pathum Nissanka's magnificent century guided Sri Lanka to a famous win at The Kia Oval.
England had the opportunity to earn a 100% home summer record for the first time in 20 years but instead paid the price for a careless display.
Though Sri Lanka lose the series 2-1, this ends a 10-match winless streak against England and, realistically, gives a measure of success to what was always likely to be a tough tour.
Below-par displays on days two and three left England up against it at the beginning of day four, when Sri Lanka resumed on 94-1, needing another 125 to reach their target of 219.
Kusal Mendis was bounced out for 39 by Gus Atkinson thanks to Shoaib Bashir's brilliant catch. Another 111 runs were still required, but any England hope was snuffed out by the composure of Nissanka and Angelo Matthews.
Nissanka had already passed three figures when Bashir missed a half-chance to catch him at third man. By then, the game had gone.
Nissanka ended unbeaten on a quite brilliant 127, Mathews on 32. Their unbroken partnership of 111 gave Sri Lanka victory by eight wickets and only a fourth Test victory in this country.
England end the summer with series wins against West Indies and Sri Lanka, though also with a sense of what might have been.
Their next Test series, in Pakistan, begins in less than a month, albeit with doubts over the schedule because of renovation works at a number of venues in the country.
An unrelenting international calendar continues on Wednesday when an almost entirely separate England squad begins a T20 series against Australia in Southampton.
Reset summer ends with a whimper
This was a low-key end to England's summer of evolution. On a grey day in front of a meagre crowd, England did not have the potency to halt the determined Sri Lankans.
Much has been made of the changes England have made, pretty much all of them necessary and most with success. Jamie Smith, Atkinson and Bashir have a foundation to build towards the Ashes in 2025-26.
To go with the new personnel, injuries to Ben Stokes, Zak Crawley and Mark Wood meant only four of this England XI survived from their previous Test at The Oval, against Australia last year.
If this adds a hint of mitigation for England's failure to secure a second successive 3-0 clean sweep, there are few excuses for the way the hosts frittered away this Test.
From 261-3 in the first innings, they collapsed to 325 all out. On the second evening they were happy to give Sri Lanka some low-pressure runs against spin, when a more sensible option would have been to bowl pace to bring the close because of bad light.
The way England batted to be 156 all out in only 34 overs in their second innings was amateurish.
It is difficult to win every Test in a home summer. In seasons of five Tests or more, England have only done it on two previous occasions though, with respect to Sri Lanka and previous opponents West Indies, they should have done it this time.
This is only the ninth Test England have lost since McCullum became head coach and comes in the week he also took over the white-ball team. Defeats can be accepted but, given the opposition and the manner, this should give England pause for thought.
Cool Nissanka guides Sri Lanka home
This target could have been problematic for Sri Lanka, only for Nissanka to attack on the third evening and take a chunk out of the chase.
By the time he resumed on 53 on Monday, he had become the first batter to make two half-centuries at faster than a run a ball in the same Test in England.
The home side needed early wickets and Atkinson, battling a quad injury, was fit to bowl. In the fifth over the day, Mendis hooked to fine leg where Bashir took a superb diving catch. The door was open.
Swinging the ball under lights, Chris Woakes tested new man Angelo Mathews, repeatedly going past the outside edge. Mathews survived, Nissanka remained and England's weapons were neutralised.
Debutant left-armer Josh Hull and off-spinner Bashir could provide neither control nor threat, while Nissanka tucked in when Olly Stone was too short.
Nissanka reached his second Test century, off 107 balls, with a back-foot punch off Atkinson and the game was within Sri Lanka's grasp.
England had one more chance to remove Nissanka, via a cut at a Stone bouncer, only for the ball to fall through the hands of the diving Bashir at third man.
Still, by then England were already beaten and was fitting that Nissanka hit the winning runs, cutting Bashir for four.