Sri Lanka had one of their great days as they levelled the two-Test series against Australia in Galle. First, Dinesh Chandimal’s double-century – also his career-best – carried them to a huge lead, and then Prabath Jayasuriya completed the best figures by a Sri Lankan on Test debut with a 12-wicket haul as they surged to an-innings-and-39-run win with time to spare on the fourth evening.

They were ahead when play began, but not a position of such strength that this sort of finish was the most likely outcome. However, Australia had no answer to Chandimal – who helped the last four wickets add 145 [in comparison, Australia’s last five in the first innings added 35]. And then their second innings resembled one of the subcontinent nightmares of the not-too-distant past.

They lost all ten wickets for 102, across just 28 overs, and nine in the final session. Jayasuriya twice took two wickets in an over, breaking the back of the top order with the first brace of Usman Khawaja and Steven Smith, and fittingly wrapped up the victory with his record-breaking strike when he spun one past Mitchell Swepson. Just five bowlers in history have taken 12 or more wickets on debut, and for a spinner, he sits behind only Narendra Hirwani’s 16, against West Indies in Chennai in 1988.

For Australia, it was their first innings defeat since losing to South Africa in Hobart in 2016, and the first ever after making more than 350 in their first innings

They could have lost a wicket in the second over – Niroshan Dickwella missed a stumping chance offered by Khawaja, when Maheesh Theekshana was handed the new ball – but the relative ease with which Khawaja and David Warner progressed ended up being very misleading.

Warner fell shortly before tea sweeping at Ramesh Mendis and reviewed an lbw decision that was plumb – more of that was to come – but it was in the final session where mayhem really ensued.

Jayasuriya, handed a Test debut at the age of 30 after the continued travails of Lasith Embuldeniya and Covid-19 for Praveen Jayawickrama, settled into his work and caused all manner of problems. It was a performance to do Rangana Herath proud.

Khawaja was his first victim, getting an inside edge to backward short-leg, which was sharply held by Oshada Fernando, who, for the second game running, was needed as a Covid substitute when Pathum Nissanka tested positive. Three balls later, Jayasuriya trapped Smith lbw with one which straightened enough to beat him on the back foot. Smith knew he was out, but still reviewed. Ultimately, it did not matter, but it was a questionable call from Smith.

Sri Lanka sensed their moment. Travis Head’s lean Test tour concluded when he got into a poor position to tackle Ramesh, beaten on the outside edge by one which spun sharply, and his returns in Sri Lanka and Pakistan will likely provoke much debate ahead of next year’s India tour regardless of his home form.

Marnus Labuschagne and Cameron Green briefly rallied against deep-set fields that allowed plenty of scoring opportunities, but after nine overs the next cluster of wickets arrived. Labuschagne had swept Jayasuriya often from very full deliveries, but the stroke let him down when he played over one which was heading low into middle stump.

Jayasuriya then completed his second five-wicket haul of the game with two in three balls. Green charged past one, and this time Dickwella completed the job, and Mitchell Starc edged to slip where Kusal Mendis held a superb catch. The only question left was whether the light would hold for Sri Lanka to finish it. Jayasuriya and Theekshana ensured they did.

The ability to put Australia under such big scoreboard pressure was down to Chandimal. When he went to 193, he set a new high for a Sri Lanka batter against Australia, surpassing Kumar Sangakkara’s 192 in Hobart, and the last-wicket stand also lifted the team to their highest total against Australia.

At times, every Australia fielder was on the rope, but Chandimal was either able to weigh strokes perfectly to scamper back for a second, or clear the ropes. He brought up his double-hundred with a second consecutive six off Starc, the ball after sending one nearly into the fort, during a final-wicket stand of 49 in 37 balls with Kasun Rajitha, where he farmed the strike smartly and showed his power at the conclusion of an innings that had largely been about careful accumulation.

Prior to that, Chandimal and Ramesh took their seventh-wicket stand to 68 before Starc struck with the first delivery after taking the third new ball, a swinging low full toss that caught Ramesh straight in front. However, thoughts of quickly running through Sri Lanka’s remaining wickets were frustrated by Theekshana, who showed stubbornness at No. 9 in his first Test innings.

Pat Cummins eventually got one past Theekshana’s outside edge to rip out his off stump, giving the Australia captain his 199th Test wicket. Nathan Lyon’s enormous workload continued as he reached 64 overs with only two wickets to show for it. This was just the third time since 1981 that an Australian bowler has sent down more than 60 overs in an innings. They would not have expected to be batting a couple of hours later.