Roshen Silva steered Sri Lanka into a lead with a classy half-century after England looked destined to take a healthy advantage on day two of the second Test in Pallekele.

Sri Lanka were in trouble on 165-6 on Thursday but led by 46 at stumps after recovering to 336 all out.

Dimuth Karunaratne (63) and Dhananjaya de Silva (59) made half-centuries and Roshen top scored with a superb 85 after receiving support from the tail.

Jack Leach (3-70) and Adil Rashid (3-76) took three wickets apiece, while the tourists were also boosted by five penalty runs - taking their first-innings total up to 290 – awarded after Roshen was adjudged to have deliberately run short.

Sri Lanka added 84 runs for the last two wickets as they attempt to level the three-match series, with nightwatchman Leach successfully seeing off one over before the close.

Moeen Ali (2-85) struck in the third over of the day after Sri Lanka resumed on 26-1, Malinda Pushpakumara (4) giving Rory Burns a simple catch at midwicket.

Karunaratne played with great application for a deserved half-century and it took a moment of brilliance from Ben Stokes to run the opener out with a direct hit when the all-rounder only had one stump to aim at.

Sri Lanka were 139-4 at lunch after Stokes demonstrated his prowess in the field again with a brilliant instinctive one-handed catch at first slip when Leach drew an edge from Kusal Mendis (1).

Dhananjaya pulled Stokes for four to bring up his half-century and played with finesse before he was caught behind off Rashid, who generated huge turn to remove Angelo Mathews (20) in the same manner.

Roshen played with increasing authority in a tricky situation, but Sri Lanka were facing a big first-innings deficit when Niroshan Dickwella (26) was trapped leg before by Joe Root.

Dilruwan Perera became Leach's third victim just two balls after Roshen reached his fourth Test half-century at the start of the final session, but Akila Dananjaya offered support in a ninth-wicket stand of 56.

There was confusion when umpire Marais Erasmus deemed Roshen ran short on purpose at the non-striker's end before returning to other, as he and Dananjaya looked unsure if the ball touched the boundary ropes at third man.

He took that on the chin and dished out more punishment of his own, lofting Moeen for six before Rashid finally dismissed him to end the innings after Dananjaya fell for a brisk 31.

Leach played out an over from Dilruwan with confidence as Burns watched on at the other end, ensuring no further damage was done on a frustrating day for Root's side.