Sri Lanka 135 and 242 for 4 (Mathews 30*, Chandimal 20*) trail England 421 by 44 runs
Lahiru Thirimanne's first Test century in almost eight years has helped Sri Lanka take another step towards parity on the fourth morning in Galle.
Thirimanne's only other century at this level came on this ground in March 2013. But, since that match against Bangladesh, he had averaged 19.16 in 27 Tests coming into this game. Having failed in the first innings, it is no exaggeration to suggest that, by the time he walked out to bat on the third day, his career - and Sri Lanka's hopes of salvaging anything from this game - were hanging by a thread.
But he has revived his side's hopes of survival, or potentially setting a tricky fourth-innings target, with an impressively assured innings here. Showing both patience and composure, he demonstrated a decent defensive technique and put away the loose ball effectively in reaching his first century in 54 Test innings.
He did survive a couple of nervous moments on the fourth morning. On 83, he drove a boundary off Dom Bess which was just out of reach of a diving Dom Sibley at short extra-cover, while on 91 he top-edged a sweep off Bess that fell between several fielders. Shortly afterwards, an inside edge off Jack Leach flew just over short-leg.
But such moments only went to show what might have been for England. For while Leach and Bess did beat the bat on occasions, they also served up a fair number of release deliveries. When Thirimanne was on 98, for example, Bess bowled him a full toss which he was able to punch for a single and, shortly afterwards, he delivered a long-hop which Thirimanne cut for four to reach his century. There is certainly assistance for spinners in this surface, but England's haven't, at this stage, managed to land the ball in the right place often enough to exploit it.
In the end, it was the new ball that did for Thirimanne. After Sam Curran had moved a couple away from him, he got one to hold its own and take the inside edge of Thirimanne's bat. Jos Buttler, who is having a decent game as keeper, held on to a testing chance.
The day had started well for England. The nightwatchman, Lasith Embuldeniya, fell in the second over to Bess as he forced one to cover. But by the lunch break, with Dinesh Chandimal, in particular, batting positively, the deficit had been cut to just 44 runs. Sri Lanka still had work to do to save the game, but perhaps England, knowing they will have to bat last, were growing just a little nervous.
George Dobell is a senior correspondent at ESPNcricinfo