England crashed to their first home Test series defeat by Sri Lanka, as the tourists claimed a thrilling victory off the penultimate ball at Headingley, ensuring that a valiant maiden century from Moeen Ali went unrewarded.
The England spinner's rearguard action with the bat had all but saved the final Test of the two-match series, but the equally doughty resistance of last man James Andersen (0) was finally ended when he spooned a Shaminda Eranga bouncer to square leg to complete Sri Lanka's 100-run victory.
Having resumed on Tuesday at 57 for five, facing an unlikely victory target of 350, England made a positive start but lost Joe Root (31) and Matt Prior (10) in reaching 173 for seven by the interval.
Dhammika Prasad took his fifth wicket of the innings when he removed Prior, leaving left-hander Ali (108 not out) as England's best hope.
Though Ali batted all day, partners Chris Jordan (21) and Stuart Broad (0) were both trapped lbw by Rangana Herath before Anderson's hour-long resistance was ended at the death.
Earlier, perhaps frustrated by the lack of a breakthrough, Sri Lanka captain Angelo Mathews exchanged words with Root and umpire Billy Bowden was forced to intervene.
As the sledging continued Shaminda Eranga subjected Root to a feisty spell, troubling the 23-year-old with some fiery bouncers.
Root's defiance was finally ended when he edged Nuwan Pradeep to Lahiru Thirimanne in the gully, bringing an end to a 67-run partnership with Moeen for the sixth wicket.
The first Test at Lord's ended in a draw after Englanded failed to take the last Sri Lankan wicket.
Image: Sri Lanka's Dhammika Prasad (centre) celebrates with team-mates after the dismissal of England's Matt Prior during the second Test at Headingley in Leeds, England.
Photograph: Philip Brown/Reuters
Robson hits maiden ton before Sri Lanka fight back
Mathews and Prasad leave England on the brink
Headingley Test: Sangakkara reaches milestone as Sri Lanka lead
Broad hat-trick and fiery Plunkett lift England on Day 1
Sri Lanka survive dramatic session to save Lord's Test