Ramesh Mendis led the Sri Lanka fightback at Galle with a six-wicket haul to bowl out the West Indies, but the hosts stumbled after returning to bat in the second Test on Wednesday.
Sri Lanka were 46-2 at stumps on day three, trailing by just three runs. But they lost Dimuth Karunaratne, who made six before he was run out in a superb piece of fielding by Kyle Mayers.
Karunaratne was man of the match in the first Test with scores of 147 and 83 but paid the price for attempting a quick early single as Mayers ran in and found him well short of the crease.
Oshada Fernando too was run out after being turned back by non-striker Pathum Nissanka.
With Angelo Mathews out with a hamstring injury, losing two early wickets was a massive blow for Sri Lanka. They have never lost a home Test to West Indies.
Earlier, off-spinner Mendis belatedly found his line and length, dismissing Nkrumah Bonner to end his 75-run stand with West Indies captain Kraigg Brathwaite.
It broke a two-session drought for Mendis, who then ran through the tourists' middle order, ending with figures of 6-70 as the West Indies were all out for 253 after tea - a lead of 49.
The West Indies fell apart against the bounce of the new ball, though Mendis was denied a seventh wicket when wicketkeeper Dinesh Chandimal dropped Kemar Roach on eight.
Left-arm spinner Lasith Embuldeniya dismissed Brathwaite with a ball pitched on leg-stump that turned away sharply from the right-hander to clip the top of off-stump.
The West Indies, who have yet to win a Test match in Sri Lanka, were looking at a decent total and a considerable first-innings lead when they finished on 145-2 at lunch.
Brathwaite's straightforward footwork and impregnable defence were a vital bulwark for the West Indies after two top-order collapses in the first Test.
The skipper cashed in when loose balls were on offer and was relentless against Sri Lanka's two left-arm spinners, forcing the hosts to recalibrate to boundary protection.
But the afternoon collapse saw the visitors hand the initiative back to Sri Lanka on a fast-deteriorating wicket.
The second Test has been plagued by inclement weather and bad light, and Wednesday was the first full day played. Sri Lanka lead the two-Test series 1-0.-AFP