Keaton Jennings' career-best 146 not out helped England set Sri Lanka 462 to win the first Test after a dominant day three in Galle.
Jennings' second Test century, and second on the subcontinent after his 112 on debut in India in 2016, was laced with reverse and orthodox sweeps and he ended unbeaten as England declared on 322-6.
Sri Lanka openers Dimuth Karunaratne (7no) and Kaushal Silva (8no) battled to 15-0 by stumps despite some hesitant running between the wickets.
Jennings, who had only passed fifty once in 22 innings following his Mumbai hundred, shared a 107-run stand with Ben Stokes (62) and partnerships over 50 with fellow opener Rory Burns, Jos Buttler and first-innings centurion Ben Foakes.
Sri Lanka spinner Rangana Herath finished with 2-59 in his final Test innings as a bowler, taking his tally of wickets in the format to 433 and moving up to joint-eighth on the all-time list with England's Stuart Broad.
Burns (23) was the first casualty of the morning after England resumed on 38-0, run out courtesy of a direct hit from Karunaratne at mid-on after attempting a quick single off Dilruwan Perera that he had called for.
The Surrey skipper had become a tad frantic after a timid start to the day, twice playing hacked reverse sweeps and surviving a tight lbw review on 13, and England remained twitchy after his dismissal with the quick exits of Moeen Ali (3) and Joe Root (3) seeing them lose 3-14.
Ali, bowled for a golden duck in the first innings, tamely chipped Dilruwan (2-94) to a tumbling Herath at mid-on, with Herath then unfurling a beauty of a ball as Root edged behind to Niroshan Dickwella.
Sri Lanka would have had a fourth breakthrough before lunch had they reviewed an lbw shout against Jennings, with Dhananjaya de Silva's delivery later shown to be hitting middle stump - Jennings was on 58 at the time.
The second session, like the first, began in quiet fashion, only for Stokes to turn on the style around 45 minutes in, completing his 15th Test fifty with a boundary and then launching a trio of sixes.
Jonny Bairstow, missing this Test with an ankle injury, helped retrieve the ball from under the sightscreen after Stokes muscled Dilruwan down the ground for one maximum, with Stokes' third six, off Akila Dananjaya, nailing his century partnership with Jennings.
Stokes' knock was ended by a beauty from Dilruwan, with the bowler hitting the left-hander's off-stump from a ball that pitched outside leg, while a stunning piece of fielding accounted for Buttler, Kaushal taking a one-handed catch at silly point to earn Herath his final Test scalp.
Jennings had completed his hundred from 231 deliveries with a clipped single to square leg during his 77-run partnership with Buttler, having strode in at tea unbeaten on 98.
Foakes (37) then scored briskly during his 34-ball innings, striking three sixes, including two in a row off Dananjaya, before he holed out off the spinner looking for quick runs, Root calling his charges in shortly after.
Foakes then thought he had run out Kaushal during the penultimate over of the day following a sharp piece of work behind the stumps, only for the third umpire to decide the batsman had grounded his bat in time.
Watch day four of the first Test between England and Sri Lanka live on Sky Sports Cricket from 4.15am on Friday.