England were hoping to set up a modest chase on day four of the first Test in Galle after finally curbing a steadfast fightback from Sri Lanka.

Lahiru Thirimanne’s knock of 111 – his first century in more than seven years – set the tone as the hosts continued to chip away at the lofty first-innings lead of 286 and, when they eventually took the lead late in the afternoon session, things were beginning to look uncomfortably tight.

At 291 for five Sri Lanka were five ahead with five wickets in hand and two set batsman in Angelo Mathews (51no) and Niroshan Dickwella. But two wickets in eight balls – Dom Bess taking Dickwella’s outside edge and Jack Leach cleaning up Dasun Shanaka – reset the tone. At tea the home side were looking considerably more fragile, just 16 in front on 302 for seven.

Neither of England’s spinners had been quite up to scratch, underwhelming on a turning pitch for the second day in a row, but by striking together just at the moment when the game was threatening to pivot away they had made a significant contribution to the cause.

Sam Curran also made an important intervention, ending Thirimanne’s lengthy resistance with the second new ball.

Resuming in the field with the hosts 156 for two, England got an early shot in the arm when Bess dismissed nightwatchman Lasith Embuldeniya for a duck in the second over of the day. Dom Sibley, who had been guilty of a costly drop off Thirimanne the day before, held a gentle push at short cover.

The off-spinner was unable to capitalise, though, finding Thirimanne a particularly thorny opponent. On four separate occasions he lost his length, allowing the left-hander to rock on to the back foot and cut Bess for four as he raced along from his overnight 76 not out.

The first boundary brought an optimistic but ineffective attempted catch from Sibley and the last took him to a long-awaited century. He had only experienced such a feeling once before in 37 caps spread over a decade, on the same ground in 2013.

England were not always asking the right questions, with Leach’s left-arm spin not quite as loose as Bess but still too inconsistent to crank up the pressure. Joe Root took the chance to look at two overs of Dan Lawrence’s unconventional off-breaks before the arrival of the new ball, but his first bowl in international cricket passed without incident.

Instead, it took the fresh Kookaburra to shift the dial, with Curran and Mark Wood taking it ahead of Stuart Broad.

The pair immediately strung together two maidens, before Curran located just enough assistance to pick up the nick and end Thirimanne’s stay after 251 deliveries. Mathews and Dinesh Chandimal put on another 32 before the interval, with the game settling straight back into its previous rhythm as the English attack struggled to assert itself.

An extended game of cat and mouse broke out between lunch and tea, with Broad showing the way for a much more disciplined period of play as he worked through five overs for a solitary run.

Sri Lanka scored only 60 from 29 overs in the session, but crucially lost three more batsmen. Bess got Chandimal with a regulation edge, from the kind of area he should have been hitting on a more regular basis.

Mathews was chipping away carefully, though, and when he and Dickwella erased the last of the English advantage things were getting tense. They moved into the lead when Mathews chopped an under-edge from Leach through Jos Buttler’s legs for four, but the unexpected lack of bounce will have caused more concern to England’s batsman than the runs themselves.

Sri Lanka were ahead by five when Bess changed things, picking off Dickwella from round the wicket as he ran a flat-footed prod into the keeper’s gloves to end a 48-run partnership. New man Shanaka then got his footwork wrong as Leach yorked him with some handy drift, leaving England back in charge.