Prasanna Jayawardene struck a brilliant century before England bowled out Sri Lanka for 400 on day two of the first Test at Sophia Gardens on Friday.
Jayawardene's knock of 112, including 12 fours from 168 balls, put Sri Lanka on top after Tharanga Paranavitana was out for 66, a knock that included six fours from 191 balls, and Thilan Samaraweera made 58 (nine fours, 84 balls).
England's frustration was compounded when its most effective bowler, James Anderson, was forced off with back and side problems. Anderson, who took 3-62, will undergo a scan tonight and faces the prospect of missing the rest of the Test. Graeme Swann took 3-78.
Sri Lanka began the day on 133-2 and had failed to add to its overnight score when Mahela Jayawardene (4) edged Anderson to England captain Andrew Strauss at first slip, but otherwise it suffered few alarms until Stuart Broad rapped Paranavitana on the pads.
England opted not to ask for a review and television replays suggested the ball would have clipped the stumps — but not by enough for the decision to be overturned.
Paranavitana's luck ran out two balls later when he dragged a Tremlett delivery onto his stumps.
Samaraweera was more fortunate. He edged Tremlett just past a diving Alastair Cook in the slips and again just short of Eoin Morgan at point.
Tremlett then struck Samaraweera violently on the elbow, but after a delay for treatment the batsman smashed the next delivery for four.
Sri Lanka continued to ride its luck, as Jayawardene edged Broad through the slips, but it batted through to the lunch interval without further loss.
England lost momentum after lunch by persisting with Trott's part time bowling and Sri Lanka duly accelerated, Samaraweera reaching his 50 from 72 balls.
Trott and Graeme Swann conceded 35 runs in the six overs after lunch and the tactic of resting the main strike bowlers while the old ball was still being used was only partially successful.
Anderson was handed the new ball after 80 overs and had Samaraweera caught by Graeme Swann at second slip with his sixth delivery.
But England wasted its referrals in successive overs, failing to overturn lbw decisions against Farveez Maharoof.
An exasperated Broad had three further lbw appeals turned down in his next two overs and Jayawardene compounded England's frustration by reaching his 50 from 90 balls.
The home side's luck briefly turned with the freak dismissal of Maharoof, who was run out when Trott deflected a drive off his own bowling from Jayawardene onto the stumps.
After 30 minutes of the evening session Broad finally got the wicket his bowling deserved — his 100th in Tests — when he had Perera caught by Tremlett at midwicket, to end a 68-run partnership.
In the next over Strauss dropped Jayawardene off a sharp slip chance from Swann and the batsman completed his third Test century from 147 balls when he glanced Tremlett to midwicket.
Rangana Herath made an entertaining cameo of 25 before he was caught by Trott off Swann and before a run was added Broad finally had Jayawardene caught behind.
Tailender Ajantha Mendis and Suranga Lakmal took Sri Lanka to 400, but the latter then fell to a diving catch by Broad off Swann to end the innings.