Captain Michael Clarke hit his 15th Test century to lead Australia to a draw in the final Test against Sri Lanka on Tuesday and a 1-0 win in the three-match series.
Clarke and Michael Hussey put together a record fifth wicket partnership of 176 to inflict a first home defeat in a Test series on Sri Lanka since they lost to Pakistan in 2006.
The visitors, who had trailed Sri Lanka after the first innings by 157 runs, were dismissed for 488 in their second on the final day.
Sri Lanka were left needing 332 for victory off 17 overs and had scored 7-0 in two overs when the match ended.
Clarke and Hussey came together after Phil Hughes (126) was dismissed in the sixth over of the final day, and the experienced duo recorded Australia's highest partnership for the fifth wicket against Sri Lanka.
During his 178-ball stay at the wicket, Clarke escaped two stumping chances to wicketkeeper Prasanna Jayawardene on scores of 14 and 71 and also survived a run out attempt on 13 when Kumar Sangakkara failed to hit the stumps from mid-off.
Clarke, who hit 14 fours and three sixes, and former Sri Lanka captain Sangakkara were later involved in an exchange of words where the umpires had to intervene.
Soon afterwards Clarke lost his concentration and holed out to Tharanga Paranavitana at mid-on to give Herath his sixth five-wicket haul in an innings.
Hussey, the leading run-scorer in the series with 463, missed out on a second century in the match when he was dismissed for 93.
The left-hander top-edged a sweep of Tillakaratne Dilshan to square leg where Chanaka Welegedera held on to a diving catch. Hussey hit 11 fours and a six in his 138-ball stay.
Herath continued to chip away at the Australian batting to end with career best figures of seven for 157.
When he trapped Peter Siddle for 26, Herath became only the fourth Sri Lankan bowler to capture 100 Test wickets after Muttiah Muralitharan, Chaminda Vaas and Lasith Malinga.
The hosts captured the solitary wicket of centurion Hughes in the morning session when the left-handed opener went for a sweep against Herath but top-edged it to Lahiru Thirimanne at deep square leg.
Hughes added only four runs to his overnight score. He faced 220 balls and had 16 fours and a six during his innings.
Australia won the first Test at Galle by 125 runs and drew the second at Pallakele.
Australia (1st innings): 316
Sri Lanka (1st innings): 473
Australia (2nd innings): (overnight 209-3)
S Watson lbw b Herath 21
P Hughes c Thirimanne b Herath 126
S Marsh c Thirimanne b Herath 18
R Ponting c M. Jayawardene b Herath 28
M Clarke c Paranavitana b Herath 112
M Hussey c Welegedara b Dilshan 93
B Haddin c Lakmal b Herath 30
M Johnson c Eranga b Welegedara 4
P Siddle lbw b Herath 26
T Copeland c Paranavitana b Eranga 3
N Lyon not out 1.
Extras: (b 5, lb 11, w 6, nb 4) 26
Total: (all out; 138.5 overs) 488
Fall of wickets: 1-62, 2-122, 3-188, 4-220, 5-396, 6-448, 7-452, 8-471, 9-486.
Bowling: Eranga 18.5-2-62-1 (1nb, 1w), Lakmal 22-2-86-0 (3nb, 1w), Welegedara 24-3-88-1, Herath 52-11-157-7, Dilshan 19-0-62-1, Thirimanne 1-0-7-0, Paranavitana 2-0-10-0.
Sri Lanka (2nd innings):
T. Paranavitana not out 2
L. Thirimanne not out 4.
Extras: (w 1) 1
Total: (for 0 wickets; 2 overs) 7
Did not bat: Dilshan, Sangakkara, M. Jayawardene, P. Jayawardene, Mathews, Eranga, Herath, Lakmal, Welegedara.
Bowling: Copeland 1-0-3-0 (1w), Lyon 1-0-4-0.
Result: Match drawn
Australia won the three-match series 1-0.