Galle, November 7: Moeen Ali claimed four wickets as England bowled Sri Lanka out to take a substantial lead on day two of the first Test after debutant Ben Foakes made a classy century in Galle.
Foakes became the 20th Englishman to score a hundred on debut, crafting a brilliant 107 to guide the tourists to 342 all out after they had slumped to 103-5 before lunch on the opening day.
Dilruwan Perera (5-75) completed a five-wicket haul but would have been in no mood to celebrate on Wednesday, with Sri Lanka only able to must 203 in reply.
Moeen was the pick of the bowlers with figures of 4-66, while Angelo Mathews top scored with 52 as Joe Root's side secured a valuable first-innings advantage of 139.
Keaton Jennings (26 not out) and Rory Burns (11no) extended that to 177 by guiding England to 38 without loss at stumps, putting the tourists in a strong position to strike first in the three-match series.
Foakes struck the first ball of the day for four to move into the 90s but must have feared he could miss out on three figures when Jack Leach edged Perera to Dhananjaya de Silva at first slip.
With just number 11 James Anderson left for company, the wicketkeeper-batsman went on the attack in the next over from Suranga Lakmal and got his reward, punching the seamer down the ground to bring up his century after previously working him to the boundary at backward square leg.
Foakes was dismissed off the final ball of an eventful Lakmal over, yet he was soon in the thick of the action again as Sri Lanka made a poor start to their reply.
Dimuth Karunaratne edged behind when prodding at Anderson (1-26) and Sam Curran trapped Kaushal Silva bang in front before Leach (2-41) removed Kusal Mendis.
Sri Lanka were in deep trouble on 42-4 at lunch but Mathews and Dinesh Chandimal offered some much-needed resistance, though the latter was given a reprieve when the third umpire ruled that an outside edge had not carried to Ben Stokes at slip.
Skipper Chandimal, limping after suffering a groin strain on day one, was eventually stumped by Foakes for 33 after coming down the track to Adil Rashid, ending a fifth-wicket stand of 75.
Mathews reached his his half-century before tea but was caught by Jennings - fielding at short leg after Burns took a nasty blow on the neck towards the end of the afternoon session - from Moeen's first ball after the break.
Moeen generated sharp turn in an excellent spell as he also saw the back of Niroshan Dickwella (28) and Akila Dananjaya, with Rashid (2-30) then taking his 50th Test wicket to wrap up the innings.
Herath was given a guard of honour when he came out to bat and Sri Lanka will be hoping for something special from the retiring spinner on day three after Jennings and Burns saw England safely through to the close.