Galle: Rangana Herath claimed his maiden test hat-trick as 21 wickets tumbled on a frantic second day with hosts Sri Lanka closing in on a series-clinching victory against Australia in the second test in Galle on Friday.
The dramatic day began with Australia resuming on 54-2 before being 106 all out to concede a 175-run first innings lead.
Three Sri Lankan batsmen were also dismissed in the 11-wicket morning session but the hosts recovered to post 237 all out, setting Australia a daunting 413-run victory target to stay alive in the three-test series.
Australia's struggle against spin was obvious in the second innings as well as the tourists slumped to 25-3 at stumps.
David Warner was batting on 22 at the break, while skipper Steve Smith was on one after coming out to bat for the second time in the day with Australia staring at an embarrassing defeat inside three days.
Herath had tormented Australia in the first test at Pallekele, exposing their vulnerability against spin bowling and claiming nine wickets in Sri Lanka's 106-run victory.
The 38-year-old left-arm spinner haunted them again on Friday, castling Smith for five runs with the first delivery of his third over.
He ripped the heart out of Australia's batting in his seventh over, getting Adam Voges caught at extra cover with his fourth delivery and trapping Peter Nevill plumb in front with an arm ball.
He struck Mitchell Starc's pad with his next delivery and home captain Angelo Mathews successfully reviewed the original not-out decision as Herath (4-35) became only the second Sri Lankan cricketer to get a test hat-trick.
Former paceman Nuwan Zoysa was the first Sri Lankan to achieve the feat, against Zimbabwe in a 1999 match in Harare.
Off-spinner Dilruwan Perera polished off the tail to finish with 4-29 as Australia folded inside 34 overs.
Sri Lanka got off to a shaky start and, for the second time in the match, Kusal Mendis walked out to bat with his team reeling at nine for two.
The architect of Sri Lanka's Pallekele win and their top-scorer in the first innings, however, made only seven runs before Starc (6-50) sent him back.
The left-arm paceman claimed a match haul of 11 wickets but a half-century from Dilruwan Perera (64) and handy knocks from Kusal Perera (35), Mathews (47) and Dhananjaya de Silva (34) extended Sri Lanka's lead.
Sri Lanka - 281 (Mendis 86, Mathews 54, Starc 5-44) and 237 (D Perera 64, Starc 6-50)
Australia - 106 (D Perera 4-29, Herath 4-35) and 25 for 3 (Warner 22*)
Status - Australia need 388 runs to win