Skipper Joe Root was run out shy of a second successive double century Sunday as England scored 339 for nine in reply to Sri Lanka's 381 on day three of the second Test in Galle.
Root was out to a direct throw from Oshada Fernando on 186 in the final over of the day, and stumps were called with England trailing by 42 runs.
Sri Lanka's Lasith Embuldeniya claimed seven wickets and broke a key seventh-wicket stand of 81 between Root and Dom Bess, who fell to the left-arm spinner for 32.
Root, who completed his 19th Test ton in 99 matches before lunch, kept pushing in the marathon knock of 309 balls.
The captain, who hit a match-winning 228 in his team's opening win, was helped along by wicketkeeper-batsman Jos Buttler in a partnership of 97 runs.
"Quite an amazing innings," Buttler said of his skipper.
"To back up his double hundred in the first Test... both physically and mentally to show the application to go and do it again to their spinners. A masterclass really.
"It has been a great education for all of us really watching it from the sidelines."
Buttler added: "I think we just have to praise not just the technical and tactical aspects of his game, but the physicality and concentration to apply himself for so long is quite amazing."
Debutant Ramesh Mendis took his first international wicket when he dismissed Buttler for 55 after the batsman's reverse sweep hit his boot and the ball lobbed for an easy catch to short leg.
Buttler survived a similar call in the morning session when replays showed his shot had hit the boot and ground, and he went on to register his 18th Test fifty.
Embuldeniya, who registered his third five-wicket haul, struck twice early in the day with his left-arm spin, including the key wicket of Jonny Bairstow, to break a 111-run third-wicket stand with Root.
Bairstow, who added just four more to his overnight 24, was given not out by the umpire but Sri Lanka successfully reviewed the call as replays suggested the ball had grazed the bat before hitting the pad and being caught second slip.
Root reached his hundred with a single off Dilruwan Perera and raised the bat to an applauding dressing room and lone England fan standing on the ramparts of the fort overlooking the picturesque ground.
He went past England greats including Geoff Boycott (8,114), Kevin Pietersen (8,181) and David Gower (8,231) in Test runs before he attempted a cheeky single, and was run out while returning back to his crease.
"The wicket is turning now compared to day one and day two," said Embuldeniya, who added if they could get close-out the England innings early Monday and set a target of 150-200, "we are in the game".
The series resumed on January 14 behind closed doors after being cancelled in March due to the coronavirus pandemic.