South African team members congratulate Kagiso Rabada (C) after he had bowled Australia's Mitchell Marsh (L) during the One Day International Cricket match between South Africa and Australia on October 12, 2016, at Newlands Stadium, in Cape Town. RODGER BOSCH/AFP/Getty Images

Australia has lost a five-match ODI series 5-0 for the first time in history, as South Africa won by 31 runs overnight to seal the series whitewash.

The Proteas batted first and set the Aussies a score of 328 to win, although it wouldn't have been that high without the partnership of Rilee Rossouw and JP Duminy.

The pair combined for a fourth-wicket total of 178, which certainly steadied the ship for the home side after South Africa began 3-52.

Rossouw's third ODI century, 122, lead the Proteas to their final tally, but Australia's run chase early looked promising.

Aaron Finch and David Warner's opening partnership lasted 72 runs before Finch was bowled by Imran Tahir, and Tahir struck again two balls later removing captain Steve Smith.

George Bailey fell next after making just two runs, and the Aussies were quickly on the back foot at 3-75 after losing three wickets for three runs.

Warner took the onus on himself to step up and lead the team, and in doing so made the highest ODI total against South Africa by an Australian.

His 173 was six shy of his career best, but the left hander was eventually run out with just three overs remaining as Australia suffered their fifth loss this series.

South Africa 8/327 (Rossouw 122, Duminy 73, Mennie 3-49) beat Australia 296 (Warner 173, Tahir 2-42, Abbott 2-48) by 31 runs