Dasun Shanaka (2ndL) celebrates with with teammate Chamika Karunaratne after winning the third T20 match at the Pallekele Cricket Stadium in Kandy on Saturday night. AFP
The hosts were chasing a target of 177 to finish the series on a high after going down miserably against the visitors in the first two matches. Shanaka scored an unbeaten 54 off 25 balls with five fours and four sixes to seal a four-wicket victory.
Shanaka and tailender Chamika Karunaratne shared a 69-run stand for the seventh wicket after they had been struggling at 108 for six in the 15th over.
Sri Lanka needed 59 off the final three overs, with the pair facing lead bowlers Josh Hazlewood and Jhye Richardson.
Needing 19 off the final over bowled by Hazlewood, the skipper hit two fours and a mighty six to level the scores with one ball remaining. Hazlewood then bowled a wide to hand the win to the home side.
Australia's cricketers pose with the T20 series trophy in Kandy. AFP
Openers Danushka Gunathilaka and Pathum Nissanka made a promising start in reply to Australia's 176-5. Gunathilaka scored a 12-ball 15 before Charith AsaLanka joined Nissanka.
The pair put on 42 for the second wicket. AsaLanka scored 26 off 19 before he was caught by Aaron Finch off Marcus Stoinis.
Bhanuka Rajapaksa (17), Kusal Mendis (six) and Wanindu Hasaranga (eight) could not accelerate the scoring before Shanaka and Karunaratne picked up the challenge.
"I took a few balls to get in. I read the wicket well, so I didn't throw my wicket away. Process is always important," Shanaka said after his player-of-the-match performance. "They took a brave decision to bat first, it wasn't the best idea to bat first in these conditions. We should take this momentum in the ODI series moving forward," he added.
Finch called Shanaka's innings "an unbelievable knock" but exuded confidence in his team for the upcoming five one-day internationals.
"We are really comfortable with the depth of our team," Finch, who was declared the player of the series, said.
Earlier, Australia won the toss and elected to bat with opening pair David Warner and Finch playing formidable knocks before Steven Smith and Stoinis led their team to 176 for five. Warner and Finch enjoyed a 43-run opening stand.
Dasun Shanaka (R) and Chamika Karunaratne celebrate their team's victory over Australia. AP
Finch scored 29 off 20 balls before spinner Maheesh Theekshana removed his off stump as the Australian skipper attempted a slog-sweep. All-rounder Glen Maxwell opened his innings on the next ball with a massive six.
Maxwell smashed Hasaranga for another six in the seventh over but fell for 16 off nine balls after attempting to hit the spinner in the ninth over the long-on boundary where Gunathilaka took the catch.
Theekshana had Warner leg before wicket for 39 off 33 balls in the next over after the hosts reviewed a not out decision.
The visitors battling line up stuttered after Josh Inglis, who replaced an injured Mitchell Marsh for the match, was run out next ball for a duck. Stoinis then struck three fours and a six in his 23 ball innings of 38 before he was stumped by Mendis off Praveen Jayawickrama.
Smith remained not out for 37 off 27 balls with two fours and two sixes, with wicketkeeper Matthew Wade contributing 13.
Sri Lankan speedster Dushmantha Chameera was the most expensive bowler, giving away 46 runs in his four overs. Theekshana picked two for 25 while Hasaranga and Jayawickrama claimed one each.
The hosts will take on the visitors in the first ODI in Pallekele on Tuesday.