India hit back with an early wicket, as Ishant Sharma bowled Malinda Warnapura (eight), before Sri Lanka closed on 14 for one with Michael Vandort on three and nightwatchman Chaminda Vaas on nought. The unorthodox Mendis extended his wicket tally in his first series to 23 as India failed to take any advantage from winning the toss on a good batting pitch.
However, the early damage was done by debutant pace bowler Dammika Prasad, who recovered from a nervous start with the new ball to dismiss Virender Sehwag (21), Rahul Dravid (10) and Sachin Tendulkar (six) in the first session.
Opener Gautam Gambhir continued his good form from the second test in Galle, which India won by 170 runs to level the series, to score 72 from 128 balls with 10 boundaries.
India were given a flying start with Sehwag and Gambhir plundering boundaries off some wayward bowling from Prasad and Chaminda Vaas, adding 51 in seven overs.
Sri Lanka's fielders also missed early opportunities with Malinda Warnapura dropping Sehwag on 14 at short square leg following a Vaas bouncer.
Tillakaratne Dilshan, fielding at point, missed a run out chance a few minutes later when Sehwag backed up too far.
Sri Lanka finally broke through when Prasad found the outside edge of Sehwag's bat with an outswinger.
Prasad, who was rested briefly, returned to bag two more wickets before lunch.
Dravid, initially given not out, was trapped lbw by an inswinger after Mahela Jayawardene called for an umpiring review.
Tendulkar was also given out lbw to an inswinging delivery, a decision against which he appealed unsuccessfully with television replays showing the ball missed the bat.
After lunch, Gambhir and Saurav Ganguly (35) extended their partnership to 49 before Muralitharan had Ganguly caught at slip by Mahela Jayawardene.
Minutes later Sri Lanka won their second review of the day, winning an lbw decision against Gambhir after television replays indicated the ball hit pad before bat.
Laxman and Parthiv Patel battled hard as the run rate slowed, adding 35 runs for the sixth wicket, before Laxman was stumped three balls before tea.
After the break Mendis made quick inroads into the lower order, trapping Patel lbw for 13 and bowling Anil Kumble for one.
When Harbhajan Singh (three) was caught in the deep trying to slog Muralitharan, India were reeling on 198 for nine.
Fortunately for the tourists, Zaheer Khan (32) and Ishant Sharma (17 not out) made the total more respectable with a 51-run last wicket stand before Mendis claimed his fifth wicket.