Sydney: Australia scrambled over the line for a two-wicket victory in the fifth one-day international against South Africa on Sunday to move back to the top of the world rankings less than three months before the World Cup.
What looked like being a stroll to a convincing 4-1 series triumph when Steve Smith departed for 67 with Australia 11 runs from their target of 275 was transformed into a tense finale by Robin Peterson.
The South African spinner (4-32) did most of the damage as the hosts lost four wickets for three runs but James Faulkner held his nerve to smash the winning runs off the first ball of the final over.
For much of the evening, though, the South Africans looked like they were mentally on the plane home and looked unlikely to defend their original tally of 280 for six, let alone the amended target put in place after a short storm.
Australia's masterblaster openers set about the chase in typical flamboyant fashion but David Warner (21) had already departed when the rain delay reduced their allocation of overs to 48.
There was no stalling Aaron Finch, however, and he put on 100 with Shane Watson before falling for 76 to a brilliant piece of fielding from Faf du Plessis, who caught the ball falling over the rope but offloaded it to Rilee Roussouw.
South Africa's bowling appeared to lack bite without the rested Dale Steyn and Watson cashed in with 82 off 93 balls, clubbing a second huge six a couple of balls before holing out to Roussouw at deep midwicket.
Smith's innings lacked the fluency of his 104 in Melbourne or his unbeaten 73 in Canberra and he admitted he had caught a couple of breaks, most notably when he was bowled by Kyle Abbot off a front foot no ball.
Earlier in the afternoon sun, Quinton de Kock's fine 123-ball 107 anchored the South African innings before the opener became Pat Cummins (3-54) third victim when he nicked the ball attempting an uppercut and was caught behind.
Roussouw (51) and Du Plessis (2) had earlier fallen victim to the young Australian quick in one rain-disrupted over.
De Kock's exit left the tourists on 206 for five with just under 10 overs remaining but Farhaan Behardien did his World Cup chances no harm with a blistering career-best 63 from 41 balls to bolster South Africa's tally.
Earlier, South Africa's stand-in captain Hashim Amla won the toss and chose to bat.
AB de Villiers and Dale Steyn was rested, having played the first four matches, and this meant a return to the side for Morne Morkel and Rilee Rossouw.
Australia made one change to the team that won from a long way back at the MCG, recalling Josh Hazlewood for the injured Nathan Coulter-Nile.
Teams
Australia: 1 Aaron Finch, 2 David Warner, 3 Shane Watson, 4 Steven Smith, 5 George Bailey (capt), 6 Glenn Maxwell, 7 Matthew Wade (wk), 8 James Faulkner, 9 Pat Cummins, 10 Josh Hazlewood, 11 Mitchell Starc
South Africa: 1 Quinton de Kock (wk), 2 Hashim Amla (capt), 3 Faf du Plessis, 4 Rilee Rossouw, 5 David Miller, 6 Farhaan Behardien, 7 Ryan McLaren, 8 Robin Peterson, 9 Wayne Parnell, 10 Morne Morkel, 11 Kyle Abbott
Brief scores
South Africa - 280/6 (de Kock 107, Behardien 63, Rossouw 51, Cummins 3-54)
Australia - 275/8 -- 47.1/48 ov, target 275 (Watson 82, Finch 76, Smith 67, Peterson 4-32)
Result - Australia won by 2 wickets
MOM - Quinton de Kock (South Africa)
Player of the series - Steven Smith (Australia)