|Second Test, Galle (day two)|
|Sri Lanka 281 & 237: D Perera 64, Starc 6-50|
|Australia 106 (D Perera 4-29, Herath 4-35) & 25-3: D Perera 2-9|
|Australia need 388 more runs to win|
Rangana Herath became the oldest bowler to take a Test hat-trick as Australia were dismissed for 106 on day two of the second Test in Galle.
The left-arm spinner, who is 38 years and 139 days old, is the second Sri Lankan to take a Test hat-trick.
Adam Voges, Peter Nevill and Mitchell Starc - after a third-umpire review - fell to Herath in the 25th over.
Herath finished with figures of 4-35 as Australia were bowled out for their lowest Test score against Sri Lanka.
Previously, the oldest man to take a hat-trick was England's Tom Goddard, who was 38 years and 84 days old when he struck against South Africa in Johannesburg in 1938.
Herath's hat-trick is the first by a Sri Lanka player in Tests since 1999, when Nuwan Zoysa struck against Zimbabwe with his first three deliveries of the game.
Off-spinner Dilruwan Perera also had a superb day with bat and ball, taking 4-29 in Australia's first innings and top-scoring with 64 in Sri Lanka's second innings before falling to left-arm paceman Mitchell Starc (6-50).
Perera then narrowly missed out on a hat-trick after dismissing nightwatchman Nathan Lyon and Usman Khawaja in Australia's second innings before captain Steve Smith survived the hat-trick ball as the visitors, chasing 413 to win, finished on 25-3 at the end of a remarkable day in which 21 wickets fell.
Only once have two hat-tricks been taken in the same Test, when Australia leg-spinner Jimmy Matthews achieved the feat in each innings against South Africa at Old Trafford in the triangular Test series of 1912.