It was England's lower order that came to England's rescue as Sam Curran and Jos Buttler's fifties helped the visitors post 285 before being bundled out by the Sri Lankan spinners on Day 1 of the 2nd Test at Kandy.
Sri Lanka lost opener Kaushal Silva cheaply at the Pallekele International Stadium - bowled by Jack Leach for 6. Night-watchman Malinda Pushpakumara, who arrived at the crease with 4.4 overs left, and Dimuth Karunaratne ensured there was no further trouble. Karunaratne was unbeaten on 11.
Karunaratne survived some nervous moments as Sri Lanka batted for 12 overs before stumps.
The day belonged to Sam Curran, who helped England reach a competitive total with the spinners getting plenty of purchase on a dry surface.
Curran added 60 runs for the last wicket with James Anderson to push England's total close to 300. England's No. 8 batsman did well to shield the last man and wasn't afraid to cash in when loose balls were offered.
He was dropped on 53 by Pushpakumara and was the last man dismissed for a well compiled 64. Curran hit six sixes, most of them lofted drives over long-on or long-off, and one four as Sri Lanka went onto the defensive mode.
Sri Lanka were sitting pretty with England on 225-9, but Curran, with the help of Anderson, turned the tide. England leads the series 1-0 and Curran's effort could help the team win its first series in Sri Lanka in 17 years.
Earlier, Curran and Adil Rashid added 45 runs for the eighth wicket with Rashid contributing 31 runs.
"Getting close to 300 was massive for us. Rashid played beautifully before tea and I tried to take over where he left off. We got a nice score on the board," Curran said. "They looked like they started to panic a little bit almost. You have got to take those risks when you can on a wicket like that."
Jos Buttler was the other half-centurion in the England innings while opener Rory Burns chipped in with 43 runs.
With Sri Lanka's spinners posing significant threat, Buttler used the sweep shot, both the conventional and reverse, to good effect. His 63 came off 67 balls with seven fours.
Off-spinner Dilruwan Perera was the most successful bowler finishing with 4-61. Pushpakumara, playing his first Test in more than a year, finished with three wickets. Akila Dananjaya, whose bowling has come under a cloud after match officials reported him for a suspect action in Galle, finished with two wickets.
"We thought we should restrict them to 200. But the last pair, as you see, added 60 runs and that's a big bonus for them," Pushpakumara said. "It will be tough for us. Our batsmen need to score all those runs."
(With AP Inputs)