Colombo - England were all out for 230 in their second innings on Sunday setting Sri Lanka the mammoth task of scoring 327 to win the third and final Test and avoid a series whitewash.
Coming back from 39-4 in the morning session, Jos Buttler, Ben Stokes (42) and Ben Foakes (36 no) got the runs that left Sri Lanka facing a mountain to climb with two days left to play.
Dilruwan Perera took Keaton Jennings lbw with the first ball of the day lbw to shake England, and took five wickets in all. But after the top order scare, spinner Lakshan Sandakan made two basic blunders that set the tone for the tourists' recovery.
The left-arm spinner had Stokes caught at cover on 22, then at slip on 32, only for replays to show Sandhakan had overstepped the bowling line on each occasion.
England scored 336 in their first innings and Sri Lanka 240.