Ben Foakes completed a debut century before England dismissed Sri Lanka for 203 and extended their lead to 177 on day two of the first Test in Galle.
Foakes (107) became the second England wicketkeeper to hit a ton in his first Test, after Matt Prior against Windies at Lord's in 2007, as the tourists scored 342 having begun the day on 321-8, Sri Lanka off-spinner Dilruwan Perera (5-75) taking a seventh Test five-for.
Foakes' dream debut continued with a catch two balls into the Sri Lankan reply after James Anderson had located Dimuth Karunaratne's edge, with the hosts then slumping to 42-4 before Angelo Mathews (52) and captain Dinesh Chandimal (33) rebuilt with a stand of 75.
However, Sri Lanka folded again once Chandimal and Mathews were ousted either side of tea with Moeen Ali bagging 4-66 before Keaton Jennings (26no) and Rory Burns (11no) marshalled England to 38-0 by stumps.
Burns' Surrey colleague Foakes resumed on 87 and drilled the first ball of the morning through the covers for four and added a further three boundaries before he was caught at extra-cover to be last man out.
Foakes' hopes of three figures were in jeopardy when Jack Leach (15) edged Dilruwan behind with the debutant on 95 and last man Anderson (0no) snicked just short of slip.
But the 25-year-old then pulled Suranga Lakmal behind square for four before completing a 200-ball century with a punched boundary down the ground and following that with a blazing shot to the midwicket fence.
Foakes - the fifth gloveman in total to score a century on Test debut, after Prior, New Zealand's Tom Blundell and Sri Lankan pair Romesh Kaluwitharana and Brendon Kuruppu - soon had his maiden Test catch, the review from Karunaratne (4) in vain with Ultra-Edge showing a clear spike.
Sri Lanka's innings was in tatters when Kaushal Silva was pinned lbw by a Sam Curran in-swinger, Kusal Mendis edged Leach to Ben Stokes in the slip cordon and Dhananjaya de Silva was bowled on the sweep by Ali.
Chandimal, batting at No 6 rather than No 3 after battling a groin strain, and Mathews stopped the rot - Chandimal did edge Rashid to Stokes on 17 only for third umpire Sundaram Ravi to overturn the soft signal of out having decided the ball had not carried.
Rashid finally had his man stumped by Foakes after Chandimal danced down the pitch, though Mathews sealed his 30th Test fifty shortly before tea, which was taken a few minutes early after Burns was struck on the head at short leg from a Niroshan Dickwella sweep.
Burns' misfortune meant a fielding reshuffle with Jennings deployed at bat-pad and he caught Mathews off Ali from the first ball after the break.
Ali claimed the next two wickets as well, Dickwella (28) chipping a tossed-up ball to a leaping Jos Buttler at short cover and Akila Dananjaya (0) feathering through to Foakes, who took a fine grab up close.
Leach's subsequent dismissal of Dilruwan (21), Buttler again the catcher, meant Sri Lanka had lost three wickets for four runs and fell to 175-9.
Rangana Herath (14no) - given a guard of honour by England as he strode out to bat in his final Test - and Lakmal (15) smashed two boundaries apiece before Lakmal slashed Rashid to Anderson at gully with Sri Lanka 139 runs in arrears at that stage.
Watch day three of the first Test between England and Sri Lanka live on Sky Sports Cricket from 4.15am on Thursday.