Australia's Alex Carey and Marnus Labuschagne combined for a gritty 51-run stand to help them seal a consolation four-wicket win over Sri Lanka in the fifth one-day international in Colombo on Friday as the hosts took the series 3-2.
Chasing a modest 161, Australia were reduced to 50-4 before Labuschagne (31) and Carey (45 not out) dug them out of a hole and Cameron Green (25 not out) finished the job with just over 10 overs to spare.
Spinners Dunith Wellalage (3-42) and Maheesh Theekshana (2-26) kept Sri Lanka in the hunt but Dasun Shanaka's side were left to rue a limp performance with the bat.
"The series was hard fought, but credit to Sri Lanka for the way they played, they deserve the win," said Australia captain Aaron Finch.
"Pleased with the way we performed. I would like to thank all the fans, they have been amazing."
Sri Lanka chose to bat but slumped to 85-8 before Chamika Karunaratne (75) dragged them back into the game with a fighting half century, putting on 58 runs for the ninth wicket with Pramod Madushan to push Sri Lanka to 160.
Josh Hazlewood (2-22) and Pat Cummins (2-22) did the early damage for Australia while Matthew Kuhnemann (2-26) also chipped in with his left-arm spin, making fine use of a turning wicket at the R Premadasa Stadium.
The sides will now turn their focus to the red ball, with Galle set to host the first of two Tests from June 29.