Australia set an unwanted world record of 154 deliveries without scoring a single run during their defeat to Sri Lanka in the first Test.
The Baggy Greens were set a target of 268 for victory thanks largely to a score of 176 from Kusal Mendis, but they fell 106 runs short in Pallekele.
Australia captain Steve Smith was the only player to make a significant score for the tourists, hitting 55 off 149 balls, but the main story came from tail-enders Steve O'Keefe and Peter Nevill.
The pair faced 22 maiden overs from the 64th until the 85th, smashing the previous record of 16 overs in a row without a run.
The ninth-wicket partnership was the slowest-scoring Test partnership of all time too, picking up just four runs from 178 balls as they tried to hold on for a draw.
O'Keefe got the only runs of the partnership with a four off Lakshan Sandokan, with the pair's run rate standing at 0.13 - significantly lower than the previous record in a partnership lasting 100 balls or more of 0.64.
Nevill was eventually dismissed for nine off 130 balls, while O'Keefe soon followed with those four runs from 106 deliveries as Sri Lanka recorded just their second ever Test victory over Australia.