Sri Lanka 240 and 53 for 4 (Mendis 15*, Sandakan 1*) need a further 274 to beat England 336 and 230 (Buttler 64, Dilruwan 5-88)
The sight of Suranga Lakmal throwing his water bottle to the ground in frustration spoke volumes for Sri Lanka's fortunes on the third day in Colombo. The Sri Lanka captain had watched his spinners drag his side back into contention with four wickets in the first hour of play. At 39 for 4 England were wobbling and Lakmal knew it.
But then he saw Ben Stokes, who had just driven a catch to extra cover, reprieved after replays showed left-arm wristspinner Lakshan Sandakan had over-stepped. Instead of a taking a key wicket, Sri Lanka had instead conceded a single to a no-ball. Stokes was on 22 at the time.
To make matters worse - ridiculously, really - Stokes survived in similar fashion a few minutes later. On that occasion Stokes, by now on 32, appeared to have edged straight to slip only for replays to show, once again, that Sandakan had overstepped. Lakmal a reluctant captain anyway, buried his head in his hands. His side could ill afford such self-inflicted injury.
Perhaps Sri Lanka had some grounds for feeling aggrieved. Broadcasters later suggested than as many as 40% of the deliveries in Sandakan's first spell should have been called no-ball. But with the umpire at his end, S Ravi (they call him DRS Ravi round these parts), not calling them, the bowler may feel he was not given the chance to correct where he was landing.
Ultimately, though, the bowler has to take responsibility for keeping his foot behind the line. And for a spinner, in particular, to err in such fashion hinted at a lack of rigour, a lack of discipline, a carelessness that has undermined Sri Lanka's cricket throughout this series.
For the scoreline probably won't show it now - England are well on their way to a first whitewash in Asia (in series of three games or more) and their first away anywhere since 1963 - but Sri Lanka have had opportunities in every game of this series. And on each occasion, they have lost the key passage of play as much through their own errors as England's excellence.
Those no-balls weren't Sri Lanka's only errors of the day, either. Niroshan Dickwella, the Sri Lanka keeper, was unable to cling on to a thin edge offered down the leg-side by Jos Buttler, on 38, from the first delivery after lunch, while Angel Mathews' impatient pull in the dying moments of the day seemed oddly naive from such an experienced player.
As it was, Stokes and Buttler added 89 for England's fifth wicket and slammed the door on Sri Lanka's hopes. In a low-scoring Test, it may well prove to be a definitive partnership.
Buttler was easily the most fluent batsman. England managed only one boundary - a clip through midwicket for four by Jonny Bairstow - in the first 70 minutes of play and were in some danger of reverting to the stuttering, timid mess that has characterised much of their batting on previous tours of Asia.
But Buttler, skipping down the pitch to the spinners, scored at nearly a run a ball, turning decent deliveries into full tosses and disrupting the length of the bowlers. At one stage, Sandakan conceded four boundaries in 10 deliveries. In the context of this match, it was a feast of runs.
There were some nervous moments along the way. Buttler was given out on 22 - an lbw decision won by Dhananjaya de Silva - only for Stokes to insist he utilise a review, which showed the ball would have bounced over the stumps. It was one of six decisions overturned on an inglorious day for the umpires.
Eventually, Stokes lofted a catch to long-on and Buttler was stumped after Sandakan saw him advancing down the pitch and fired the ball down the leg side. Dickwella made a tricky stumping appear straightforward. But by then the damage was done.
The day had started so well for Sri Lanka. Dilruwan Perera, with 22 wickets in the series, certainly does not deserve to be on the losing side and gave his side renewed hope with three early wickets on the way to a second five-for in three matches. Keaton Jennings, planting his front foot, was trapped leg before by the first delivery of the day - one that skidded on - while Rory Burns fell in similar fashion a few overs later.
When Bairstow became the latest batsman to fall to a sharp catch at short-leg - turning one off his hips nicely enough only to see Kaushal Silva, on as a substitute, cling on - and Joe Root gave a return catch to Malinda Pushpakumara as he attempted to work him against the spin, England were four down, leading by 135, and starting to look uncomfortable.
But Stokes and Buttler, with some help from Sandakan's ill-discipline, put clear water between the sides. And with England's lower order again showing their worth with the bat - the final three wickets added 59, with Ben Foakes' unbeaten 36 earning him a decent chance of ending the series as the highest run-scorer and with the highest batting average - Sri Lanka were set 327 runs to win. No team has chased so high a total at the SSC ground.
Whatever hopes Sri Lanka may have had of achieving an historic run chase were all but ended within the first few overs of their second innings. Moeen Ali, taking the new ball, had Danushka Gunathilaka caught at slip as he felt for one that left him sharply, before Dimuth Karunaratne was punished for leaving a gate by a straight one that passed between bat and pad.
Jack Leach, meanwhile, beat a groping Dhananjaya de Silva with one that straightened - although it took a review to confirm the dismissal.
The final wicket, Mathews caught attempting to pull a short ball from Stokes for the second time in the match, was another nail in the coffin. To see an England bowler bounce out an experienced player on a relatively sluggish Asian surface was to see a new, aggressive England finding new ways to win in these conditions. But it was also to see a weak Sri Lanka succumb with disappointing lack of application or spirit. There have been a few moments in this series when they've been outplayed; there have been several more when they have played a huge part in their own downfall.