Veteran spinner Rangana Herath grabbed a five-wicket haul to help Sri Lanka stun top-ranked Australia by 106 runs on the fifth and final day of the first Test in Pallekele on Saturday.

Herath claimed five wickets in the second innings. AFP

Australia, chasing a challenging 268 for victory, were bundled out for 161 before tea to trail the three-match series 0-1. Steven Smith top-scored with 55.

Sri Lankan batsman Kusal Mendis set up the win for the hosts with his superb maiden ton in his team's second innings after the home side overcame an 86-run deficit.