Australia have been left to rue a stubborn bail after it helped Charith Asalanka to bat Sri Lanka out of trouble with his maiden international century in Colombo.
Facing a must-win situation in the fourth ODI, Australia let Sri Lanka recover from 3-34 in the fourth ODI to post 258 and a potential game-winning score.
Mitch Marsh took 2-29 in his longest bowling hit out since his calf injury, while Pat Cummins also bowled well for his 2-37.
Matthew Kuhnermann also enjoyed his best day in Australian colours, claiming 2-56 as his two late wickets helped stem the tide.
But the hosts were happy to ride their luck on their way to a competitive total before being all out with one over left.
Walking to the wicket in the 10th over with three wickets already down, Asalanka had a ball from Cummins fire off his leg into the outside edge of his leg stump on just one.
Incredibly the legside bail did not budge, allowing him to continue his innings and pull off a sensational fighting effort on a slow wicket.
Australia were then forced to wait another 100 runs for their next wicket, as Asalanka and Dhananjaya de Silva (60) helped put Australia back in the match.
Dhananjaya in particular was impressive with his hitting, with his highlight coming when he plundered Marnus Labuschagne down the ground for four in the spinner’s first over.
He eventually fell to a superb catch from Glenn Maxwell, who leapt to take a one-handed grab above his head when Dhananjaya tried to hit Marsh through the legside.
Asalanka was more measured early, before finishing at more than a run a ball with his 110 coming from 106 deliveries.
Six of his 11 boundaries came from pull shots, including a magnificent one off Cummins that went over the rope for six.
His innings came after Maxwell had Niroshan Dickwell stumped in the second over of the match, before Cummins also got rid of Kusal Mendis for 14 and Marsh nicked off Pathum Nissanka on 13.
Sri Lanka threw away three wickets to run outs, including Maheesh Theekshana who was the last man out at the end of the 49th over.
The visitors now face a significant spinning challenge under lights.
Playing on the same wicket as Sunday night, Sri Lanka have picked four frontline spinners as well as offspinning allrounder Dhananjaya.
Chamika Karunaratne is the hosts’ only quick, with late-night dew potentially the only respite for Australia given it hurries the pitch up somewhat.
Australia continue to be without Steve Smith (quad) and Mitchell Starc (finger), but are insistent the pair’s injuries will not linger into the Test series.