The 34-year-old off-spinner laid bare Australia’s spin frailties, claiming 6-70 as the world’s top ranked test team folded for 183 in their pursuit of an improbable 413-run victory target.
Perera, who had claimed 4-29 in the first innings and scored 64 in his team’s second innings, became the first Sri Lankan player to score a fifty and claim 10 wickets in the same match as his side clinched their first test series victory over Australia since 1999.
Resuming on 25 for three, Australia captain Steve Smith (30) and deputy David Warner (41) showed positive intent, frequently using their feet against the spinners and dealing mostly in boundaries even though it was merely delaying what looked inevitable.
Perera separated them, trapping Warner leg-before with a straight delivery. The batsman reviewed the decision but could not get it overturned.
The spinner then returned to induce Smith into giving a bat-pad catch to Kusal Mendis at forward short leg.
Perera, whose all-round performance earned the man-of-the-match award, completed his five-wicket haul when Adam Voges (28) attempted a reverse sweep only to have his leg stump pegged back.
Kusal Mendis then displayed tremendous reflexes as he stopped a Peter Nevill shot at forward short leg and flicked it back on the stumps to run out the batsman and trigger wild celebrations at the Galle International Stadium.