An incredible unbeaten 84 from Asela Gunaratne saw Sri Lanka complete what at one stage looked like an impossible run chase to beat Australia by two wickets in Geelong.
The win means Sri Lanka claim an unbeatable 2-0 lead in the series meaning they have won back to back away T20I series against South Africa and now Australia.
Australia had posted a total of 173 all out in their 20 overs built off the back of some solid top-order contributions.
After losing skipper Aaron Finch (12) quite early Michael Klinger and Ben Dunk got Australia back on top with a 45 run stand.
Dunk (32) swung and missed at a slower one from Gunaratne and the ball licked the stumps dislodging the bails sending the Queensland man packing.
Klinger's 43 was another solid contribution from a man playing in his first series at the age of 37 and he provided a good foil for Moises Henriques.
After Klinger's departure though Australia lost a string of wickets and were it not for Henriques desperately holding it together with an unbeaten 56 the may have slumped to a more modest total.
Nuwan Kulasekera ended with figures of 4 for 31 to be the pick of the Sri Lankan bowlers.
In reply Sri Lanka lost wickets early and often sliding to 40 for 5 in the fifth over with James Faulkner, Jhye Richardson, Ashton Turner and Andrew Tye all among the wickets in the opening exchanges.
But Gunaratne wasn't giving up on this game and he mounted a fightback with Chamara Kapugedera (32) with the pair putting on 52 for the sixth wicket to leave Sri Lanka with a faint glimmer of hope.
The loss of the big-hitting Sekkuge Prasanna for just 7 seemed to spell the end of Sri Lanka's hopes of a win but again Gunaratne was undeterred.
He played his shots and he trusted his partners but with two overs left Sri Lanka needed 36 runs to win and it looked like Australia had it stitched up.
Until Gunaratne hit Henriques for three consecutive sixes and finished the over off by smashing another to the fence taking the allrounder for 22 and leaving Sri Lanka needing 14 to win.
Tye would bowl the final over and he appeared to have swung things back in Australia's favour with his first ball as Kulasekera holed out for 12 but the batsman did cross so Gunaratne was on strike needing 14 to win from five balls.
Striking a four and a six before taking a single to bring Lasith Malinga onto strike which left plenty of Sri Lanka fans and neutrals unable to watch but the tailender got one to give Gunaratne back strike for the final ball with two needed to win.
Gunaratne hammered the length ball from Tye over cover for four and Sri Lanka win off the final ball for the second time in the series and claim their third straight T20I series in Australia.