Spinner Jack Leach took five wickets as England edged towards victory over Sri Lanka in the first Test but they made a nervous start to their pursuit of a modest target of 74 and closed day four on 3-38.
Jonny Bairstow (11 not out) and debutant Dan Lawrence (7 not out) will lead the victory charge on the final day but must master a wicket offering prodigious turn that will leave Sri Lanka believing they are still in with a sniff of an astonishing upset.
South Africa were skittled for 73 in their fourth innings in Galle in 2018 as the home side took 28.5 overs to take 10 wickets, a blueprint for their potential success in this match.
England lost opener Dom Sibley (2) in the first over of their chase when he left a delivery from Lasith Embuldeniya (2-13) that clipped his off stump and Zak Crawley (8) soon followed, caught at slip by Kusal Mendis off the same bowler.
There was disaster for the visitors when captain Joe Root (1), who scored a superb 228 in the first innings, was run out by a direct hit from wicketkeeper Niroshan Dickwella to leave England teetering at 3-14.
It was a needless attempt at a single that showed the nerves of the visitors and Root’s fifth run out in tests since the start of 2018.
Earlier, Sri Lanka were bowled out for 359 in their second innings as opener Lahiru Thirimanne scored his second Test century in 37 matches before being dismissed for 111.
He was undone by the new ball when a delivery from Sam Curran (2-37) nipped back and was edged through to wicketkeeper Jos Buttler.
Offspinner Dom Bess (3-100) chipped away at the Sri Lanka middle-order, picking up the wickets of nightwatchman Embuldeniya (0), captain Dinesh Chandimal (20) and Dickwella (29) as he finished with eight wickets in the match.
All-rounder Angelo Mathews (71) batted well with the tail to frustrate the visitors and allow them to set some sort of target, his 219-ball vigil finally ended by Leach (5-122) when he edged to Root at slip.
The offspinner Leach was getting considerable turn on the crumbling surface and looked threatening with virtually every ball.
He provided a first stumping for Buttler in test cricket when he removed Dilruwan Perera (24).