Galle, Sri Lanka: Sri Lanka were bowled out for 203 in their first innings on Wednesday to trail by 139 against England on day two of the first Test in Galle.
Angelo Mathews helped the hosts fight back with his 52 after an early slip to 40-4 following England's 342. Mathews departed soon after the tea break and the Sri Lankan innings folded in the final session.
Off-spinner Moeen Ali claimed four wickets for the tourists in the match, which marks Sri Lankan spin legend Rangana Herath's swansong.
Earlier, leg-spinner Adil Rashid broke the key stand after getting Chandimal, who batted with a groin strain, stumped to further dent the hosts' batting which had slipped to 40-4 in the first session.
Mathews got his 50 with a boundary off paceman Ben Stokes but two balls later England debutant Rory Burns got a nasty hit on the back of the neck that prompted the umpires to call a break for tea.
The hosts stuttered after losing their openers Dimuth Karunaratne, for four, and Kaushal Silva, for one, inside four overs.
James Anderson got Karunaratne caught behind on the second delivery of the innings and Sam Curran trapped Silva in just his second over as Sri Lanka slipped to 10-2.
Jack Leach and Moeen Ali then spun into action to take a wicket each as the hosts wobbled on a turning Galle pitch notorious for low scores.
The Joe Root-led England suffered a similar fate after electing to bat first as they fell to a precarious 103-5, but Foakes led their revival with his 107 in 202 balls.
The 25-year-old Foakes, who replaced injured Jonny Bairstow, became the 20th English batsman to score a hundred in his first Test.