Galle, Sri Lanka: England declared at 322 for six on Thursday, setting Sri Lanka a daunting 462 to win the first Test at the famously low-scoring Galle ground.
Keaton Jennings was 146 not out after a patient innings that saw him deal deftly with the home side's spin attack, while the middle order led by Ben Stokes went on the offensive.
At the declaration, which will give Sri Lanka around an hour or so to bat, Sam Curran was on nought not out after Stokes smashed 62, Jos Buttler 35 and Ben Foakes 37.
England made 342 in the first innings thanks to a century from Foakes. Sri Lanka were then bowled out for 203, leaving them 139 behind.
Having been 38-0 overnight, a somewhat shaky Rory Burns, brought in to fill the huge shoes of the retired Alastair Cook, was run out in the morning session for 23.
Moeen Ali, out first ball in the first innings, fared little better, driving straight to Rangana Herath at mid-on off Dilruwan Perera for three.
Rangana Herath, in his last game before retiring, then got England captain Joe Root out for the second time in the match, caught behind for three.
But Jennings looked comfortable against spin on a wearing pitch that promises Sri Lanka a Herculean task on day four.
Stokes's 62 off 93 balls saw three sixes, including one back over Perera's head and an almighty sweep high over midwicket off Dhananjaya de Silva to bring up the 300.
But shortly before tea he became Perera's second scalp, a demon of a ball pitching outside leg and angling back to take the Durham all-rounder's off stump.
England made 342 in the first innings thanks to a century from Burns's fellow debutant Ben Foakes, filling in as wicketkeeper for the injured Jonny Bairstow.
Sri Lanka were then bowled out on Tuesday for 203, leaving them 139 behind, falling to a spin attack led by Ali who took four for 66.