Kallis made 61 not out in two-and-a-half hours, facing 113 balls and hitting 10 fours as South Africa, needing 335 to win, reached 340 for five in impressive style. Mark Boucher was eight not out.
It was South Africa’s highest winning second innings score, and the highest successful fourth innings against Australia, beating England’s 332 for seven in Melbourne in 1928-29.
Wicket-keeper Boucher swept part-time off-spinner Mark Waugh over mid-wicket for six to end the match 30 minutes before lunch.
Australia won the first two Tests to claim the series. They also whitewashed South Africa 3-0 on home soil at the turn of the year.
The advantage swung between the sides throughout the match, with Australia scoring 315 in their first innings, to which South Africa replied with 167. Australia were dismissed for 186 in their second innings.
South Africa resumed Monday on 264 for four, still 71 runs away from their target, with Kallis on 35 and Ashwell Prince on eight.
Prince flashed at two deliveries in paceman Glenn McGrath’s first over of the day, and fast bowler Brett Lee sent down two wides before the first runs were scored off the bat.
The 50 partnership came up in the eighth over of the morning.
Kallis went to his half-century in the 13th over of the day, driving Jason Gillespie through extra cover for four.
The fifth-wicket stand reached 99 before Prince prodded forward to a leg break from Shane Warne and was caught at slip by Mark Waugh having scored a mature 48.
Australia failed to fire on the final morning, their lot summed up by Warne’s figures of two for 108 off 30 overs.
AUSTRALIA (1st Innings) 315 (A.C. Gilchrist 91, R.T. Ponting 89).
SOUTH AFRICA (1st Innings) 167 (S.K. Warne 4-33, B. Lee 4-82).
AUSTRALIA (2nd Innings) 186.
SOUTH FRICA (2nd Innings, overnight 264-4):
H.H. Gibbs c Martyn b M.E. Waugh 104
G. Kirsten run out 64
G.C. Smith c Gilchrist b M.E. Waugh 42
J.H. Kallis not out 61
N.D. McKenzie c Hayden b Warne 4
A.G. Prince c M.E. Waugh b Warne 48
M.V. Boucher not out 8
EXTRAS (LB-2, W-2, NB-5) 9
TOTAL (for five wkts, 104.5 overs) 340
FALL OF WKTS: 1-142, 2-216, 3-218, 4-232, 5-331.
BOWLING: McGrath 28-11-54-0; Lee 20-2-75-0 (3nb, 2w); Gillespie 15-2-58-0; Warne 30-6-108-2 (2nb); M.E. Waugh 11.5-1-43-2.
RESULT: South Africa won by five wickets (Australia win series 2-1).
UMPIRES: D.L. Orchard (South Africa) and S. Venkatarghavan (India).
TV UMPIRE: I.L. Howell.
MATCH REFEREE: C.W. Smith (West Indies).
MAN-OF-THE-MATCH: Herschelle Gibbs.
MAN-OF-THE-SERIES: Adam Gilchrist.
FIRST TEST: Johannesburg, Australia won by an innings and 360 runs.
SECOND TEST: Cape Town, Australia won by four wickets.—Reuters