Kraigg Brathwaite's dogged unbeaten half-century, rain and bad light foiled Sri Lanka's push for a series-levelling victory over Windies on day five of the second Test in St Lucia.
Windies required 296 to win after bowling the tourists out for 342 early in the morning but slipped to 64-4 during the second session, which put the hosts purely in survival mode in Gros Islet.
Brathwaite (59no off 172 balls) was supported by Shai Hope (39) - who resumed his innings on six at the fall of the fourth wicket having previously retired hurt after being struck on the hip by a delivery from Lahiru Kumara - and skipper Jason Holder (15no) as he compiled his 17th Test fifty.
Those alliances, coupled with rain in the final session and play then being called off with 20.3 overs left in the day due to bad light with Windies on 147-5, means the hosts will take a 1-0 lead into the final Test in Barbados from Saturday, the first day-nighter in the Caribbean.
Shannon Gabriel earlier bagged 8-62 to take his match figures to 13-121 - the best by a Windies bowler at home and third best overall, after Michael Holding's 14-149 against England at the Oval in 1976 and Courtney Walsh's 13-55 versus New Zealand in Wellington in 1995.
Gabriel, 30, also picked up his 100th Test wicket when he bowled last man Akila Dananjaya (23), having pinned Suranga Lakmal (7) lbw in his previous over as Windies quickly polished off the Sri Lanka second innings - the tourists adding only eight runs to their overnight 334-8.
Kasun Rajitha had Devon Smith (1) and Kieran Powell (2) caught before Windies reached double figures, while Lakmal bowled Roston Chase (13) with a beauty and Shane Dowrich (8) fell to spinner Dananjaya.
Sri Lanka would only manage one more scalp - Hope bowled by Lakmal - meaning Chandimal's men must now win in Bridgetown to save the series.
Chandimal may not play in that game, though, if he is found guilty of ball-tampering - the captain has denied the charge, levelled against him by umpires Aleem Dar and Ian Gould on day two of the match, and will now attend an ICC hearing.
Watch day one of the third Test, a day-nighter, live on Sky Sports Cricket from 6.55pm on Saturday, via the red button.