Jamie Smith's counterattacking half-century rescued England after a batting collapse brought Sri Lanka back into the third and final test at The Oval on Sunday.
England took a 62-run lead into the second innings on Day 3 after dismissing the Sri Lankans for 263, but stumbled to 82-7 to put the match in the balance.
Enter Smith, England's young and confident new wicketkeeper, who smashed Sri Lanka's bowlers to all parts of the ground in a 50-ball 67 before getting himself out in the last ball before tea.
The English were 140-8 and leading by 202 as they looked to wrap up the series 3-0 and complete a clean sweep of victories this summer, having beaten the West Indies 3-0 in July.
Smith hit 52 off his last 19 balls in a brilliant knock that illuminated an England innings that was going off the rails.
Aside from Dan Lawrence's cavalier 35, no other batter got above 12 in the face of some fine swing and seam bowling by the tourists until Smith arrived. Joe Root (12), Harry Brook (3) and Gus Atkinson (3) all were trapped lbw and Chris Woakes edged behind for a duck.
Earlier, Sri Lanka resumed on 211-5 but was dismissed after adding 52 runs in the morning session, with 20-year-old left-armer Josh Hull removing captain Dhananjaya de Silva (69) and Vishwa Fernando (0) to finish with figures of 3-53 in his first test match.