Half-centurion George Bailey starred in Australia's tense run chase as the visitors edged past Sri Lanka by two wickets in the third one-day international and took a 2-1 lead in Dambulla on Sunday.
Australia chased down 227 in 46 overs to deny Sri Lankan batsman Tillakaratne Dilshan a winning farewell in his final ODI.
Bowlers set up the win for the visitors after restricting Sri Lanka to 226 all out in 49.2 overs with Dinesh Chandimal top-scoring with 102.
The Sri Lankan bowlers also made their presence felt with skipper Angelo Mathews providing the hosts with two early wickets including that of his opposite number David Warner.
Mathews got Warner caught at point for 10 as Dilshan took a splendid catch.
Aaron Finch, who scored a 29-ball 30 with three fours and a six, was next to go after left-arm spinner Amila Aponso trapped the opening batsman lbw.
Mathews struck again with his medium-pace to get Shaun Marsh, who was included in the XI in place of resting Steve Smith, out for one and put the visitors in trouble at 44 for three.
Travis Head and Bailey, who scored a gritty 70, put on 62 runs for the fourth wicket to put the tourists' chase back on track as the duo scored runs at a decent pace.
Off-spinner Dilruwan Perera bowled Head for 36 as batting suddenly seemed difficult under lights at the Rajgiri Dambulla International Stadium.
Bailey, whose 142-ball stay was laced with five boundaries, held fort as he got Matthew Wade for company and the batsmen put on 81 for the fourth wicket to keep the visitors in sight of their target.
Bailey posted his 20th ODI fifty as he mixed the right dose of caution and aggression, forcing the Sri Lankan think-tank to rotate their bowling options.
Dilruwan Perera finally got Wade stumped for 42 to break the dangerous stand and bring alive the packed home crowd.
Soon leg-spinner Seekkuge Prasanna got Bailey bowled in the 42nd over with Australia needing another 23 runs for victory.
A wobbling Australia lost another two wickets before Adam Zampa got the winning runs as he got the ball sailing over extra cover where Dilruwan Perera dropped the catch to the delight of the visiting players.
Mathews, Aponso and Dilruwan Perera took two wickets each.
The fourth ODI of the five-match series is scheduled for August 31 at the same venue.