Kandy - Sri Lanka's Roshen Silva held the fort with a stubborn 85 to secure a 46-run first innings lead over England on the second day of the second Test on Thursday.
Shortly before stumps in Kandy the hosts, down 1-0 in the three-match series, were bowled out for 336 in reply to England's 290 with stand-in skipper Suranga Lakmal not out 15.
The visitors were yet to open their account after night-watchman Jack Leach faced six balls from Dilruwan Perera in the final over of the day. Rory Burns was accompanying Leach at close of play.
Adil Rashid had struck twice after lunch to raise the tourists' hopes of securing a crucial first innings lead on a seemingly turning pitch.
But Silva built crucial partnerships including a 56-run ninth wicket stand with Akila Dananjaya as the hosts edged past England's total.
Perera made 15 before falling leg before to Leach while Dananjaya frustrated England before falling to Moeen Ali, also leg before for 31. Suranga Lakmal was unbeaten on 15.
England had made inroads into the Sri Lankan middle order through some brilliant fielding by Ben Stokes before lunch but Silva frustrated the opposition bowlers for the rest of the day.
Dimuth Karunaratne, who made 63, put on 96 for the third wicket with Dhananjaya de Silva, who hit 59, to steady the innings after they had slipped to 31 for two early in the day.
But Stokes, who on Wednesday had failed with the bat as England's new number three, broke the partnership when he pounced to run out Karunaratne with a direct throw from gully.
The star all-rounder then took a stunning one-handed catch low to his left at first slip to dismiss Kusal Mendis for one off the slow left-arm spin of Leach.
England's first innings total was 285 but Sri Lanka were docked five runs after the umpires deemed that Silva did not ground his bat properly while taking a run.