England managed just one wicket on the fourth morning as Sri Lanka's Kusal Mendis stalled the tourists' push for a series whitewash in Colombo.
Play began with the home side 53 for four in pursuit of a ground record 327 but English hopes of a speedy conclusion were blunted by defiant batting.
Mendis' free-flowing 77 not out guided Sri Lanka to a quietly comfortable 164 for five at lunch, with Roshen Silva offering steady support on 37. From uninspiring beginnings, the pair took their side to within 163 of a famous chase.
Nightwatchman Lakshan Sandakan had earlier lingered for half-an-hour before a combination of drift and turn from Jack Leach saw him nick to Ben Stokes at slip.
Mendis proved a tougher proposition, starting on 15 and was eased into his stride by a Moeen Ali full toss that disappeared for six over midwicket.
He was quick to seize on errors in length, finding the ropes on the handful of occasions Moeen, Leach and Adil Rashid dropped short to race along to 50 in just 55 deliveries.
Roshen settled into his work at the other end and both men ducked and dodged a feisty spell from Stokes, who went back to his favourite bouncer barrage before finally being no-balled by umpire Sundaram Ravi for going too short, too often.
The session ended with 111 runs score and the solitary wicket of Sandakan, leaving England with questions to answer at the break.