Ben Stokes and Jos Buttler rode their luck as England battled back from four cheap wickets to build a 206-run lead at lunch on day three of the final Test against Sri Lanka.
The possibility of a major collapse had been on the cards at 39 for four, with England's top order blown away in the first 11 overs of the day, but Stokes (32no) and Buttler (38no) hit back with an vital, incident-packed stand of 71.
Stokes was caught twice off Lakshan Sandakan no-balls, at cover on 22 then slip moments before the interval, with the spinner guilty of egregious sloppiness. Buttler was also given out on 27 but a seemingly sound decision was overturned when ball-tracking showed it skipping over middle stump.
Opener Keaton Jennings started the rot, propping forward unconvincingly at the first ball of the day from Dilruwan Perera and was given lbw as it slid straight on with the arm.
Rory Burns had been looking on from the non-striker's end but departed almost identically as the off-spinner willed another wicket-to-wicket delivery into the front pad.
First-innings centurion Jonny Bairstow was Perera's third scalp of the day, making 15 before being bravely caught at short-leg by Kaushal Silva off a forceful on-side punch.
When captain Joe Root fed a leading edge back to left-armer Malinda Pushpakumara just nine balls later England appeared to be in a tailspin. The fifth-wicket duo restored equilibrium, Stokes and Buttler tipping the scales back in their side's favour.
The pair knocked Sandakan off his length, with the wrist spinner shipping four boundaries in two costly overs to release the pressure.
Sri Lanka could scarcely believe their fate when Sandakan's wandering front foot and Buttler's DRS gamble denied them another wicket before lunch and already face a hefty chase with six batsmen still to remove.