Tillakaratne Dilshan's illustrious international career ended on a losing note as Australia beat Sri Lanka by four wickets in Colombo, despite a dramatic late collapse, to complete a 2-0 series victory.
In his 497th and final appearance for his country, the flamboyant Dilshan was only able to contribute a solitary run and the hosts were duly restricted to 128-9, with only Dhananjaya de Silva (62) and Kusal Perera (22) reaching double figures.
Adam Zampa (3-16), James Faulkner (3-19) and John Hastings (2-23) impressed for Australia, who looked set to romp to victory when Glenn Maxwell (66 off 29 balls) dominated an opening stand of 93 with David Warner.
However, Maxwell's departure triggered an unexpected collapse on a pitch offering plentiful turn and Dilshan delighted the crowd by claiming 2-8 - including a wicket with what proved his final delivery - before a maximum from Travis Head eventually got the tourists home with 13 balls unused.
Australia will therefore head home having won both limited-overs rubbers following their humbling 3-0 Test series defeat.
While his final appearance did not go to plan prior to his late success with the ball, Dilshan was understandably lauded by Sri Lanka's fans before, during and after Friday's match.
One of only 11 players to have scored hundreds in all three formats, he boasts 17,671 international runs and is also his nation's record run-scorer in T20s.
ICC chief executive David Richardson hailed Dilshan's contribution to Sri Lankan cricket.
In a statement, Richardson said of the 39-year-old: "He will be remembered for his innovative strokes and as a destructive opener. He was also a useful spin bowler and an outstanding fielder. We congratulate Dilshan for a fine career and wish him every success in the future."
Sri Lanka were unable to generate any momentum with the bat on Friday following Dilshan's early dismissal, which saw the veteran edge to first slip chasing a wide ball from Hastings.
All-rounder Faulkner and leg-spinner Zampa took centre stage thereafter as wickets fell at regular intervals, although De Silva's maiden T20 international half-century at least ensured the hosts made it into three figures.
A target of 129 never appeared likely to challenge an Australia side that posted a world record total of 263-3 in Tuesday's first T20.
Maxwell thumped 145 from 65 deliveries in that match and carried on where he left off, striking the joint-fastest T20 fifty by an Australian, from just 18 balls.
Maxwell eventually played on to Seekkuge Prasanna (1-16), triggering a late flurry of wickets that threatened to turn the match on its head, but Australia were not to be denied.