Jos Buttler made a classy 64 and Sri Lanka lost four late wickets as England closed in on a 3-0 Test-series sweep at the end of day three in Colombo.
The hosts had made the fast start they needed after being bowled out for 240 on Saturday as Dilruwan Perera (5-88), who became the quickest bowler to take 100 Test wickets in Sri Lanka, tore through the top order to leave England reeling at 39-4.
The typically aggressive Buttler led the recovery and his fifth-wicket stand of 89 with Ben Stokes (42) put the brakes on Sri Lanka's revival, while a couple of costly no-balls from Lakshan Sandakan hindered the home side and left captain Suranga Lakmal with his head in his hands.
After England were bowled for 230 to set a victory target of 327, Moeen Ali claimed Danushka Gunathilaka and the crucial wicket of Dimuth Karunaratne either side of Jack Leach snaring Dhananjaya de Silva.
Stuart Broad then took a fine catch as Angelo Mathews fell into Stokes' trap to leave Sri Lanka 53-4 and facing a monumental task to avoid a whitewash.
The scratchy batting that has characterised previous England tours of Asia reared its ugly head in a tumultuous opening 70 minutes that yielded just one boundary from Jonny Bairstow.
Dilruwan skidded one through that trapped Keaton Jennings (1) with the first ball of the day, with Rory Burns (7) soon following in similar circumstances and Bairstow (15) became the spinner's third victim via a sharp take at short-leg from substitute fielder Kaushal Silva.
Joe Root (7) then punched one back to left-armer Malinda Pushpakumara as England threatened to unravel.
Things would have been worse had Sandakan not overstepped when Stokes, on 22, drove to extra cover and the the all-rounder survived again off the same man after edging to slip when on 32 thanks to another no-ball.
When Niroshan Dickwella failed to hold an edge off Buttler, who had already overturned an lbw review, the tide had truly turned in England's favour.
Buttler deserved huge credit for making it so, coming down the track to disrupt the spinners and scoring at just under a run-a-ball, including three boundaries in the space of four deliveries from the luckless Sandakan.
The stand with Stokes was ended when the all-rounder hoicked one to long-on before Buttler was stumped as Sandakan gained a measure of revenge.
Moeen (22) and Adil Rashid (24) added valuable knocks, before Ben Foakes made a patient 36 off 82 until Leach (0) became Dilruwan's landmark wicket to end the innings.
The final hour proved just as fruitful as Gunathilaka (6) prodded to slip off Moeen, who cleaned up Karunaratne (23) with a beauty after Leach trapped Dhananjaya (0) lbw, and a fine day was capped as Broad expertly ran in from midwicket to snaffle Mathews (5) just above the ground.