Steve Smith smashed a brilliant century to lead Australia to a series-clinching three-wicket victory over South Africa in the fourth One-Day International between the teams on Friday.
He hit a career-best ODI total of 104 from 112 deliveries as the Australians passed South Africa's 267-8 with six balls to spare at the Melbourne Cricket Ground.
The Australians were in deep trouble after the top-order collapsed to 98-5 in the 25th over before Smith and Matthew Wade turned things around.
The pair added 121 runs for the sixth wicket before Wade departed for 52 in the 45th over with the match still in the balance.
But all-rounder James Faulkner, who finished unbeaten on 34 off just 19 balls, shared a 48-run stand with Smith to tie the scores.
Smith then had the chance to hit the winning run but was bowled by spinner Robin Peterson, trying to smash the ball out of the ground, leaving Pat Cummins to seal the victory off the next ball.
AB De Villiers earlier fell just short of a deserved hundred after a masterful batting display for the Proteas.
De Villiers finished with 91 off just 88 deliveries and David Miller hit a quick-fire 45 while six other South Africans made double figures.
Cummins and Faulkner bagged two wickets each for the Australians, who wrapped up the series with a one match to go despite the absence of injured captain Michael Clarke and strike bowler Mitchell Johnson.
De Villiers was the backbone of the South African innings, striking six boundaries and rarely looking troubled against the Australian attack.
The visitors were looking set for a total in excess of 300 after reaching 230-4 in the 42nd over when De Villiers lost his wicket, holing out to Smith at deep midwicket after being deceived by a slower ball from Cummins.
The Australians succeeded in stemming the South African onslaught in the final few overs. Peterson hit the only six of the innings, when he slogged a ball from Faulker back over the bowler's head.
But the Australian got his revenge next ball with a slower delivery that crashed into Peterson's stumps.