Phillip Hughes scored his first Test century in two and a half years to give Australia every chance of playing out a series-winning draw at the SSC. But at the end of a day that began with a Sri Lankan crawl as Angelo Mathews ate up valuable time in reaching his maiden Test hundred, Rangana Herath had troubled Australia's top order enough to give Sri Lanka hope of victory.
The Sri Lankans must win the match to level the series, and their fate hinges on whether they can run through Australia's middle order early on the final day. At stumps on the fourth afternoon, Australia were 52 runs in front, with seven wickets in hand, and they had a well set Hughes still at the crease on 122 alongside the captain Michael Clarke on 8.
If time does beat Sri Lanka, they will regret their slow march on the fourth morning, when they added 45 runs to their overnight total but took more than an hour and a half to do so. By tea, Australia had all but knocked off the 157-run first-innings deficit and they were in no hurry during the final session, happy to bat as much time out of the match as possible.
Not that Hughes had been slow. He brought up his century from his 141st delivery with a push through the off side for two, and his celebration was noticeably muted: there was a small fist pump and raise of the bat but none of the helmet-kissing that has marked Australian milestones in recent years. He knew that the selectors had shown great faith in him by dropping Simon Katich.
Hughes hadn't passed fifty in any of his past ten Test innings, and not since his twin hundreds in Durban in March 2009 had he reached triple figures for his country. He took 23 balls to get through the nineties, which included a nervous moment on 99 when he survived an lbw review after getting in a tangle trying to dab behind gully; the ball had hit the flap of his pad before bat, but outside the line.
Earlier, Hughes had been in fine form, and his driving through cover whenever the seamers overpitched was especially strong. He also cleared the midwicket boundary with a slog off Herath and brought up his fifty with another slog sweep, this time off Tillakaratne Dilshan, from his 67th delivery. Importantly, he had support all the way.
His partnerships with Shane Watson, Shaun Marsh and Ricky Ponting were all worth sixty-something. Herath worked hard to remove all three batsmen, the dismissal of Ponting for 28 late in the day a key blow when the ball turned sharply and kissed the batsman's gloves on the way through to Mahela Jayawardene at slip.
Herath had earned the wicket of Watson (21) with a delivery that went straight on, and despite a huge stride forward, Watson was lbw on review after being given not out by the on-field umpire. That review worked for Sri Lanka; another one would have worked against them, if only Marsh had thought to request one when he was out for 18.
It was a strange dismissal, as Marsh was given out caught at bat-pad, but replays showed Herath's delivery had turned so much that it missed the bat and gloves by a significant margin. However, perhaps forgetting the DRS was available or maybe just convinced he had made contact, Marsh failed to ask for the review that would have saved him.
But that was hardly the most baffling part of the day's play. The real mystery was why Sri Lanka batted so slowly during the morning, when what they really needed was quick runs to give themselves adequate time to bowl Australia out and then complete a chase if necessary. Instead, the focus seemed to be solely on Mathews making his hundred, no matter how long it took.
He did get there, and remained unbeaten on 105 after he lost three of his final four partners while en-route to triple figures. The Australians were happy to consume valuable minutes by setting the field back, knowing Mathews would not take singles early in an over to expose the No.11 Suranga Lakmal, and the path to his century was long and drawn out.
Eventually, he got there from his 229th delivery with a drive through cover for four off Peter Siddle, and it was a relief for a man who had twice been out in the nineties. The final wicket fell when Lakmal was bowled by Mitchell Johnson for 13, after Siddle picked up the early breakthroughs.
Siddle started the day by bowling Shaminda Eranga for 12 with a fullish ball that caught the inside edge and cannoned on to the leg stump, and he followed up by trapping Herath lbw for 3. Herath had the decision reviewed but to no avail, and a few overs later Chanaka Welegedara was run out in a major mix-up with Mathews.
Welegedara pushed to mid-on and took off for a single but ended up at the bowler's end alongside his partner Mathews, and the ball was relayed to Brad Haddin who whipped the bails off at the other end. It typified a morning when Sri Lanka were simply not on the ball.
But by the end of the day, Herath's strikes had at least given them some chance of victory. If they start the fifth morning as they did the fourth, that hope will quickly disappear.