Rogers pounced for the winning try with five minutes left
Australia: (10) 20
Tries: Gerrard, Rogers
Con: Mortlock 2
Pens: Mortlock 2
South Africa: (0) 18
Tries: Fourie, Montgomery
Pens: James 2
A late converted try from Mat Rogers saw Australia maintain their hopes of winning this year's Tri-Nations with a nailbiting victory over South Africa.
Wallabies wing Mark Gerrard scored the only try of a scrappy first half as the hosts turned around 10-0 in front.
But South Africa turned the game on its head with two Butch James penalties and a try from centre Jaque Fourie.
Percy Montgomery's score made it 18-13 to the Boks, but Stirling Mortlock converted Rogers' try to steal victory.
After trouncing the Springboks 49-0 three weeks ago, their second win of the competition lifts the Wallabies to within three points of leaders New Zealand, having played a game more.
We held our nerve and showed good composure at the end
Aussie captain George Gregan
South Africa gained a bonus point for their endeavours but they will reflect on a golden opportunity lost after a second-half turnaround at the Telstra Stadium.
They didn't help themselves with some woeful kicking before the interval, some aimless punting compounded by Montgomery missing two easy penalty attempts at goal.
Mortlock, having missed an early shot of his own, did land one after 11 minutes to put Australia in front.
There followed 20 minutes of tedious tactical kicking on both sides which was was finally relieved when Springboks fly-half James attempted an ambitious cross-kick.
Gerrard scored the opening try
Instead of its intended recipient, Bryan Habana, the ball bounced invitingly into the arms of the electric Gerrard, who raced 60m unopposed to touch down.
Mortlock's conversion made it 10-0, a lead they held until the interval as Montgomery missed a second easy kick at goal.
The full-back was relieved of the duties in the second half and as Australia's error count grew, James landed two penalties in quick succession to make it 10-6.
The Springboks went in front after 54 minutes as the Wallabies poor scrum allowed the visitors to pounce on a loose pass from number eight Wycliff Palu.
Scrum-half Fourie du Preez hacked on and Stephen Larkham, who had a dreadful game, allowed the ball to slip from his grasp, Fourie touching down the loose ball.
James' conversion made it 13-10, only for Mortlock to level matters with a penalty just after the hour.
But the Springboks continued to press and were rewarded after Montgomery was driven over with 12 minutes left.
We did everything we could to win, it's just heartbreaking
Australia coach John Connolly threw on Sam Cordingley and Rogers at half-back, and along with fellow replacement Phil Waugh they conjured up the winning try.
With five minutes left, Cordingley flipped the ball up at the back of a ruck, Waugh surged into space and his awareness and measured pass sent Rogers away to the left corner.
That levelled the scores with a touchline conversion to come. But when Mortlock's kick bounced off the upright and over the bar, the Boks must have sensed it was not their night.
Australia: Latham; Gerrard, Mortlock, Giteau, Tuqiri; Larkham, Gregan (capt); Holmes, McIsaac, Blake, Sharpe, Vickerman, Elsom, Smith, Palu.
Reserves: Paul, Shepherdson, Chisholm, Waugh, Cordingley, Rogers, Rathbone.
South Africa: Montgomery; Ndungane, Fourie, Olivier, Habana; James, Du Preez; Du Randt, Smit (capt), Van der Linde, Muller, Matfield, Tyibilika, Smith, Cronje.
Replacements: Ralepele, Andrews, Van der Berg, Van Niekerk, Januarie, Bosman, Van der Westhuyzen.