Joe Root earlier made his record 34th test century for England, taking the Yorkshireman past the 33 test hundreds scored by Alastair Cook to make him England's greatest centurion in the game's longest format.
Sri Lanka lost the wickets of Nishan Madushka and Pathum Nissanka early in their second innings, leaving Dimuth Karunaratne (23) and Prabath Jayasuriya (3) at the crease when play was stopped due to poor light.
The visitors have a mountain to climb if they are to rescue the series. The highest successful run chase in international test cricket history is 418, which West Indies chased down to beat Australia in Antigua in May 2003.
England were all out for 251 in their second innings, Root making 103 to add to his 143 in the first innings.
The hosts built steadily on their 231-run lead from the first innings in the morning, playing under lights on a gloomy day in north London. They lost wickets steadily, with Ben Duckett, captain Ollie Pope and Harry Brook falling before the lunch interval.
Duckett (24) was dismissed with a fine two-man catch off Milan Rathnayake, getting a thick edge on the ball that Nishan Madushka at gully dived for but could only parry into the air for Angelo Mathews at second slip to grab.
Pope (17) was out not long after Duckett, having stepped back and slashed at a ball from Asitha Fernando, sending it sailing into the air towards deep backward point and into the hands of Jayasuriya.
Brook (37) scored quickly and was lucky to survive one dropped catch by Madushka but offered him another chance near the boundary that the Sri Lanka fielder held.
After the break wickets fell steadily as Root kept his sights set firmly on a place in the history books.
Jamie Smith (26), Chris Woakes (5), Gus Atkinson (14) and Matthew Potts (2) all came and went as Root moved into the 90s, before hitting another boundary to reach three figures. He jumped for joy, removed his helmet and saluted the crowd as his teammates applauded on the pavilion balcony.