South Africa (24) 44
Tries: Smith, Steenkamp, Spies, Francois Steyn, JP PietersenCons: Morne Steyn 4, Butch James Pens: Morne Steyn 2, Francois Steyn
Australia (28) 31
Tries: O'Connor 2, Genia, Mumm Cons: Giteau 4 Giteau Pens: Giteau
Genia went over for an early try as the Wallabies started quickly
South Africa recovered from a nightmare start to beat Australia and move to second place in the Tri-Nations.
The Wallabies amassed 14 points in only four minutes after quickfire tries from Will Genia and James O'Connor.
The sides shared some 38 points before the break, and the 50th minute saw Francois Steyn finish a messy move to put the hosts into the lead at 34-31.
Further points by Francois Steyn and a try from JP Peterson put the match beyond Australia's reach.
The win means South Africa edge a point ahead of Australia and into second place with five points - but still way behind the All Blacks who are uncatchable at the top with 23.
The victory also ended a four-game losing streak for Peter de Villiers' men, and was a fitting way to mark the Victor Matfield's 100th Test at his home ground.
After the game, Springboks' Juan Smith paid tribute.
"This crowd was unbelievable and it was well deserved for a big hero like Victor.
"A start like that is something we want to scratch out pretty quickly. But the boys stuck to their task."
The final score was in stark contrast to the opening stages when the Springboks looked as if they were on course for a drubbing.
Australia's Drew Mitchell caused an early scare in second minute, but a video reply showed he grounded the ball just short of the try-line.
The let-off for South Africa did not last long when, just a minute later, Genia wriggled away from Victor Matfield's challenge to open the Wallabies' account, with Matt Giteau converting to make it 7-0.
Matfield marked his 100th South Africa Test with a victory
Two minutes on, a slick counter-attack started by Kurtley Beale was finished off by James O'Connor, and South Africa looked in real trouble.
However, they produced the ideal response when Juan Smith executed a well-rehearsed move to score his 11th Test try, but this brief respite was immediately spoiled when O'Connor landed an opportunistic try after Bryan Habana allowed the ball to slip through his hands from the restart.
Giteau converted to make it 21-7 to the visitors - and boos rang out from the home fans.
The jeers had the desired effect and Springbok number eight Pierre Spies cut the gap with a try minutes before the break to make it 28-24.
The momentum was now in the hands of the home team and in the second half a clearly tiring Australia only put three points on the board, while South Africa managed a match-winning 20.
The lead changed hands in the 50th minute when Francois Steyn did well to hang on to a slippery pass from Morne Steyn before throwing himself over the line.
From there on there was only one likely winner. A thumping try-saving tackle by Francois Hougaard on Adam Ashley-Cooper proved symbolic of Springbok dominance over a team which had started to make careless, tired mistakes.
Australia doggedly piled forward, but were unable to find that ruthless cutting edge which had seen them tear apart South Africa's defence so easily in the first half.
JP Pietersen took the game beyond any doubt when he broke away in the final stages, and substitute kicker Butch James added the final points as the Boks ran out 44-31 winners.
Australia skipper Rocky Elsom reflected on losing control of the game in the second half.
"We got restricted in the second half and it cost us. It was moving so fast that whoever was able to hold onto the ball was going to win and we weren't able to do that."