One-day international, Johannesburg: South Africa 438-9 beat Australia 434-4 by one wicket
Gibbs was South Africa's matchwinner on a remarkable day
South Africa reached the highest target ever in a one-day international to cap an unforgettable day of cricket and win the five-match series 3-2.
Captain Ricky Ponting hit 164 off 105 balls as Australia shattered the record score with 434-4 and looked to be in an impregnable position in Johannesburg.
But with Herschelle Gibbs hitting a remarkable 175 off 111 balls and Graeme Smith 90, the hosts fought back.
Mark Boucher hit the penultimate ball to the boundary to complete the win.
The home crowd went delirious after seeing 872 runs scored in the day and Australia concede a head-to-head one-day series for the first time in four years.
Previously, no team had ever reached 400 before and this match will go down in history as one of the finest ever staged.
Ponting's contribution in Australia's innings was overshadowed by what followed.
Michael Hussey helped him add 158 for the third wicket, contributing 81, as Australia shattered the previous best score - Sri Lanka's 398-5 against Kenya 10 years ago.
Australia won the toss on a perfect batting wicket at the Wanderers and were given an ideal start by Adam Gilchrist (55) and Simon Katich (79).
They put on 97 in barely 15 overs for the first wicket as an attack missing Shaun Pollock, Andre Nel and Charl Langeveldt struggled from the off.
The opening stand was only ended by a stunning one-handed catch by Andrew Hall at mid-on - but that was soon forgotten in the carnage that followed.
Ponting began cautiously but was soon thumping sixes about on the same ground where he had hit an unbeaten 140 in the 2003 World Cup final.
He put on 119 with Katich off 93 balls - but that was just the warm-up act.
His partnership with Hussey occupied just 96 balls as the pair went ballistic with almost any ball on a length hit for four or six.
After Hussey had fallen to a catch in the deep, the 400 came up in the 48th over with Roger Telemachus producing four no-balls in succession.
Ricky Ponting's fine innings was eclipsed by Herschelle Gibbs
By then, Andrew Symonds had joined in the party but Ponting finally holed out at deep extra cover in the same over, which cost 28 runs in all.
South Africa looked doomed to lose heavily once Boeta Dippenaar had fallen in the second over.
Gibbs and Smith had other ideas, however.
In less than 21 overs they put on 187 runs in extraordinary fashion, actually reducing the required run rate and making the unthinkable possible.
Gibbs was in no way put off his stroke when Smith was caught in the deep, accelerating to reach his century off 79 balls.
After hitting successive sixes off Symonds, he moved to 175 in the 32nd over with South Africa still only three wickets down and suddenly the hosts were favourites to win.
But trying to hit Symonds over the covers, he drove a catch to long-off and when Jacques Kallis was next to go - caught and bowled by Symonds - it set up a tense finish.
Nathan Bracken's final spell looked like it might settle matters Australia's way and he finished with figures of 5-67.
In his first over back, the 40th, he conceded just two runs, and in his following over he had Justin Kemp caught at point - and only three runs were scored.
Suddenly, 77 were needed from the last seven overs and it seemed too tall an order.
However, Johan van der Wath hit 35 off 18 balls and Telemachus 12 off six to throw the game wide open again.
Seven were needed off the final over with two capable batsmen, Boucher and Hall, at the crease.
When Hall clubbed Lee over midwicket for four, it left two wanted from four.
He was caught next ball to bring Makhaya Ntini to the crease, and a single from him, plus a four driven over mid-on by Boucher completed the win.
Australia's Mick Lewis suffered worst of all the bowlers, his 10 overs costing 113 runs - the worst figures ever and the first time a bowler has conceded more than 100 in a 50-over match.