Sri Lanka were 176 for three at stumps on Day 4, with Mendis unbeaten on 94. They require another 277 runs on the final day.
Kusal Mendis led a strong Sri Lankan second innings effort but the West Indies still held the advantage at stumps on day four of the first Test at the Queen's Park Oval in Trinidad on Saturday.
Set a daunting target of 453 when the hosts declared their second innings at 223 for seven just after lunch, the visitors reached 176 for three by the close with Mendis unbeaten on 94.
They require another 277 runs on the final day and will be hoping their captain Dinesh Chandimal, who retired unwell on 15 in the afternoon session, can resume his innings to bolster a team that looked completely out of contention at the start of the day's play.
Given that the world record for the highest successful run chase in the fourth innings of a Test match is 418 -- set by the West Indies against Australia in Antigua in 2003 -- the odds are very much stacked against the Sri Lankans, especially with the pitch offering more variable bounce that could prove increasingly hazardous on the final day.
However, if Mendis can replicate the determination he showed through nearly four hours at the crease and get the support from his teammates, starting with nightwatchman Lahiru Gamage, then a draw at the very least still remains a possibility.
His innings has not been without incident, though, as he would have been given out caught behind off fast bowler Shannon Gabriel when on six had West Indies captain Jason Holder opted for a television referral of the not out ruling given on the field.
Mendis, who has so far faced 186 deliveries and struck two sixes and nine fours, was also dropped on 42 by wicketkeeper Shane Dowrich off leg-spinner Devendra Bishoo.
It was Bishoo who claimed the final wicket of the day just before bad light ended play when he had Roshen Silva caught and bowled off a leading edge.
Gabriel had earlier despatched Mendis's opening partner Kusal Perera to a first slip catch by Devon Smith in the fourth over of the innings and after Chandimal left the field with his personal score on 15.
Former skipper Angelo Mathews added 74 runs with the resolute Mendis until he fell to a leg-side catch by Dowrich off Holder for 31.
Earlier, having pushed the lead beyond the 400-run mark in the morning session when they lost three wickets and added a further 78 runs, including Kieran Powell for a top score of 88, West Indies batted for an additional 15 minutes in the afternoon session before Holder declared.
It was the first time since the drawn 1985 fixture against New Zealand in Georgetown, Guyana that the West Indies had declared in both innings of a Test match. Most of the attention in the morning session surrounded the prospect of Powell reaching a fourth Test century.
Impressing with his elegant stroke play in reaching 64 overnight, the left-hander looked well on course to reach three figures but an error of judgement brought an end to his innings as he failed to get to the pitch off an attempted leg-side flick off spinner Dilruwan Perera and substitute fielder Jeffrey Vandersay took a good catch diving forward at midwicket.
Fast-medium bowler Lahiru Kumara again led the Sri Lankan effort with figures of three for 40 to finish with seven wickets in the match.
West Indies (1st Innings): 414-8 decl.
Sri Lanka (1st Innings): 185
West Indies (2nd Innings): (overnight 131/4)
K Brathwaite c Dickwella b Kumara 16
D Smith b Lakmal 20
K Powell c sub b Perera 88
S Hope c Silva b Kumara 1
R Chase b Herath 12
S Dowrich lbw Kumara 13
J Holder lbw Herath 39
D Bishoo not out 16
K Roach not out 11
Extras: (b-4, lb-2, nb-1) 7
Total: (For 72 overs, 7 wkts declared) 223
Fall of wickets: 1-36, 2-55, 3-75, 4-119, 4-149, 6-191, 7-203
Bowling: Lakmal 12-2-32-1 (1nb), Gamage 15-3-43-0, Herath 24-5-52-2, Kumara 9-0-40-3, Perera 12-1-50-1.
Sri Lanka (2nd Innings):
K Mendis not out 94
K Perera c Smith b Gabriel 12
D Chandimal retd hurt 15
A Mathews c Dowrich b Holder 31
R Silva c&b Bishoo 14
L Gamage not out 0
Extras: (b-3, lb-3, nb-4) 10
Total: (For 53.4 overs, 3 wkts) 176
Fall of wicket: 1-21, 2-123, 3-175
Bowling: Roach 10-2-44-0 (1nb), Gabriel 10.4-2-44-1 (2nb), Holder 10-4-18-1 (1nb), Cummins 8-1-22-0, Bishoo 10-1-32-1, Chase 5-0-10-0.