Captain Joe Root smashed 124 and newcomer Ben Foakes again hit valuable tail end runs to put England in command of the second Test against Sri Lanka on Friday.
England reached 324 for nine -- a second innings lead of 278 -- when bad light stopped play for the day at Kandy. England won the first Test in Galle and are searching for a series win in the second and final Test of the tour.
Foakes was batting on 51 alongside James Anderson on four.
Spinner Akila Danajanya, whose action is under investigation by the International Cricket Council, claimed six wickets on the turning pitch.
He trapped Root lbw and then bowled Sam Curran for nought with his next ball. Adil Rashid thwarted the hat-trick but soon fell to Dananjaya's guile for two.
It was his third five wicket haul in just his fifth Test for Dananjaya, who must rush off to Australia after the game for an ICC examination of his bowling.
He however could not stop Root and Foakes swinging the game.
Root reached his 15th Test ton soon after tea, making the sweep and reverse sweep valuable weapons, as he hit 10 fours and two sixes in his 146-ball knock.
Root made an 82-run seventh wicket stand with Foakes, who reached his fifty with a six off Dilruwan Perera. The hit turned out to be the last ball of the day with dark clouds gathering and thunder heard in the distance.
As he did in his sparkling century on his Test debut in the opening game of the series, Foakes mixed caution and aggression to push up the England score.
SCORES IN BRIEF
SRI LANKA: First Innings 336 (ARS Silva 85, Karunaratne 63, DM Silva 59; Leach 3-70, Rashid 3-75)
ENGLAND: First innings 290 & Second innings 324 for 9 (Root 124, Burns 59, Foakes 51 not out; Dananjaya 6-106, Perera 2-87)