Sri Lanka started Day 3 on a good note, picking four wickets in the first hour of play. Dilruwan Perera picked three of those.
That's when Ben Stokes and Jos Buttler came together for the 89-run stand, that formed the mainstay of England's recovery and subsequent dominance. It didn't help that Lakshan Sandakan's no-balls let Ben Stokes off the hook twice in the first session.
Jos Buttler, once dropped and once reprieved by a DRS review, scored his second half-century of the series. England braved through Dilruwan Perera's five-wicket haul to set Sri Lanka 327 to win the third Test.
Moeen Ali struck twice with the new ball, accounting for both Sri Lankan openers.
While Jack Leach scalped Dhananjaya de Silva in his first over, Ben Stokes picked Angelo Mathews with a short ball for the second time in the Test. Going into Day 4, Sri Lanka need a further 274 runs with six wickets in hand.