Sri Lanka were strongly placed at 220-1 after 38 overs but paceman Doug Bollinger (4-42) bagged three wickets in two overs, including those of Tharanga and Kumar Sangakkara (49).
The hosts made their best start in the series when Tharanga and Tillakaratne Dilshan (55) put on 139 in the day-night match, watched by Sri Lankan President Mahinda Rajapakse and his Maldivian counterpart Mohamed Nasheed.
Mahela Jayawardene was the other main scorer with a 33-ball 36. The Australian bowlers, who set up their team's comfortable victories in the first two games, initially struggled for wickets as they had to wait for more than 25 overs for the first success.
Bollinger provided the breakthrough when he had Dilshan caught pulling by Michael Hussey before Tharanga and Sangakkara added 81 in 13 overs for the second wicket.
Sangakkara hit a 37-ball 49 before being trapped leg-before by Bollinger, who got his second wicket in the same over when he had Dinesh Chandimal caught by skipper Michael Clarke in the slips. Australia retained the same side.