Sri Lanka were on course for a series-closing victory over England after reaching 94/1 in pursuit of 219 to win the third and final Test at The Oval on Sunday.
After skittling England for 156 in their second innings, Sri Lanka kept the momentum late on Day III as Pathum Nissanka played beautifully for 53 batting and was also part of an unbroken 55-run partnership with Kusal Mendis (30 batting).
The visitors need 125 more to win, though have already lost the series after defeats in Manchester and at Lord's.
The Sri Lankan bowlers, led by quicks Lahiru Kumara (4/21) and Vishwa Fernando (3/40), set it up for the visitors after they were all out for 263 in their first essay, resuming on 211/5.
A stunning display of calculated hitting by wicketkeeper-batter Jamie Smith (67 off 50 balls), helped England stretch their lead past 200 which looked difficult at one stage, especially when they were reeling at 82/7.
Smith took one Milan Rathnayake over for 20, cutting and driving magnificently to rouse a full house that had fallen quiet as England wilted under the floodlights.