Keaton Jennings scored his second Test century before England declared on 322-6 - a lead of 461 runs over Sri Lanka.
Jennings struck a debut ton in India in 2016 and completed his second century in his 13th Test shortly after tea when he turned his 231rd delivery through square leg for a single and promptly punched the air.
The left-hander would have been out lbw to Dhananjaya de Silva on 58 had Sri Lanka reviewed with the spinner's delivery shown to be hitting middle stump.
Jennings put on 60 with Rory Burns (23) for the first wicket - England's first half-century opening partnership since the retirement of Alastair Cook - and then 107 with Ben Stokes (62) for the fourth.
England had reached 212-4 by the break, with Sri Lanka off-spinner Dilruwan Perera taking two of the wickets to fall, including bowling Stokes with a cracker that pitched outside leg stump and hit off, reports Sky Sports.
Burns was run out in the opening session after attempting a single, while Moeen Ali (3) and Joe Root (3) fell to spin, Ali lofting Dilruwan to mid-on and Root edging Herath behind.