The opener Kaushal Silva was unbeaten on 31 and Dinesh Chandimal was not out on five as the visitors finished the second day of the final Test at the P. Sara Oval on 76-2.
Responding to their hosts' first innings total of 200, the tourists were all out in the last ball of the afternoon session for just 163 after pace bowler Dhammika Prasad took four for 34.
The opener Dimuth Karunaratne was out first ball of the innings, caught by a diving Devendra Bishoo, after flicking uppishly at a ball by Jerome Taylor, but 20-year-old Mendis showed few sign of nerves.
Hitting seven fours, Mendis became the second wicket to fall, caught behind off Jomel Warrican with the total on 55.
Silva and Chandimal then saw out the remaining 10 overs to leave the hosts well placed to clinch the series following their innings victory in the first Test in Colombo.
After resuming in the morning on 17-1, few of the West Indies batsmen ever looked comfortable and found runs harder to get as the day wore on -- struggling in particular to score off the miserly Rangana Herath.
Between lunch and tea, the tourists lost six wickets for the addition of 86 runs.
Prasad led the way with his four wickets but he was well backed up by Dilruwan Perera who finished with 3 for 28 while left arm spinner Milinda Siriwardana also chipped in with 2 for 26.
The tourists have never won a Test match in Sri Lanka in 10 previous attempts.
