All-rounder James Faulkner became the sixth player to take a one-day hat-trick for Australia as Sri Lanka won the second match of the series.
The left-arm seamer, 26, dismissed Kusal Perera with the final ball of the 46th over before removing Angelo Mathews and Thisara Perera in the 48th.
Faulkner finished with 3-45 as Sri Lanka made 288 in Colombo.
They bowled Australia out for 206 in reply to win by 82 runs and level the five-match series at 1-1.
Slow left-armer Amila Aponso, who made his debut in the opening match of the series, finished with 4-18 in 9.2 overs, with Matthew Wade's 76 the top score for the tourists.
Bruce Reid, Anthony Stuart, Brett Lee, Clint McKay and Dan Christian are the other Australians with ODI hat-tricks.