Rookie Ben Foakes hit an unbeaten undefeated hitter 87, guiding England to safety – after Sri Lanka secured the cheapest early payout – to 8-321 at the end of the first day of the first test.
The wicketkeeper of Surrey, who knows this, may be a unique chance, as Jonny Bairstow regains form, arrived with England precariously placed in 5-103 at a notoriously low field of Galle.
Foakes built crucial partnerships, including a seventh wicket stand with 88 races, with Sam Curran, who made 48, to challenge Sri Lankan players.
England was chosen to beat first in what was the farewell party of Sri Lanka, Rangana Herath.
The right-footed Stokes settled the turn in their mid-century early in the final session, when tourists lost only three shutters after lunch.
Foots placed 61 for the sixth shutout with Jos Buttler, who was eventually caught behind Dilruwan Perera by 38.
The southpaw Curran attacked the bowling alley, hitting a four and three six before dropping two less than his fifty for spinner Akila Dananjaya.
Adil Rashid turned 35 in a 54-point position with Foakes, which increased the frustration of Sri Lankan players before becoming the fourth victim of Perera's day.
Jack Leach, with 14 points, survived a few anxious moments in the last two tournaments to give Foakes a chance to complete a major debut on day two.
Sri Lanka veteran Rangana Herath clinched her 100th test at Galle after sending England captain Joe Root to the opening session.
Only two other players managed to reach 100 testicles in a single field – Herat's legendary compatriot Muttiah Muralitharan, who won it in Galle, Kandy and SSC Colombo, and the British James Anderson in the Lord's.
Herath reached the mark when Root came down from the wicket and missed after a wind.
Root had also stabilized England when he reached 2-10, after Rory Burns, who opened the debutante, was caught behind Suranga Lakmal by nine and Moeen Ali was on the next ball.
Surrey's point guard Burns was given the difficult task of replacing Alastair Cook after his retirement in September.
After Root's resignation, Perera pushed Keaton Jennings four times before he was 50 before throwing Ben Stokes around his legs for seven while trying to sweep.