Centre Tevita Kuridrani scored a dramatic last gasp try to give Australia a 24-20 victory over South Africa they barely deserved in their Rugby Championship opener in Brisbane.
The Wallabies kicked for touch with a penalty that might have tied up the game before Kuridrani crashed over the line in a scrum of bodies, getting just enough pressure on the ball to convince the TV official that he had grounded it.
The Springboks had looked like securing a win on the back of a brilliant defensive effort and tries from lock Eben Etzebeth and debutant centre Jesse Kriel as well as 10 points from the boot of first-five Handre Pollard.
Australia stayed in the contest with a first half try from winger Adam Ashley-Cooper and a Quade Cooper penalty before flanker Michael Hooper put them within range of an unlikely victory by crossing six minutes from time.
It was a first win in four tests for Australia and will give Wallabies fans hope that coach Michael Cheika can construct a competitive side for the World Cup in England later this year.
"To me rugby's all about attitude and we kept playing after the 80th and in the end it came down to a blade of grass," Cheika said.
"There's stacks of room for improvement but we keep being told South Africa are number two in the world and we're sixth, so to get away with the win is great."
South Africa, who were without a string of top players and lost skipper Victor Matfield in the 18th minute to a hamstring strain, will count themselves unlucky to leave Australia without a point.
The experimental Springbok back row of Schalk Burger, Francois Louw and Marcell Coetzee was outstanding, defending manfully and forcing turnover after turnover at the breakdown.
"Really heart-breaking, lots of injuries, lots of youngsters, and losing our captain," said coach Heyneke Meyer.
"Everybody wrote us off, it would have been sweet."
The visitors looked assured and well organised from the start and Pollard kicked two penalties to give them a 6-0 lead in the 25th minute.
The Wallabies finally got on the scoreboard in the 34th minute when centre Matt Giteau took the ball at first receiver and his no-look pass sent Ashley-Cooper on his way to the line, the experienced winger touching down at the second attempt.
The lead lasted just four minutes, however, before a Pollard cross-kick was batted back by winger Bryan Habana and fullback Willie le Roux's pass allowed Etzebeth to score.
Pollard converted to put his side 13-7 in front at halftime and they moved further ahead four minutes after the break when Kriel weaved his way through three defenders.
At 20-7 down, the Wallabies stepped up a gear with the injection of the bench of halfback Nick Phipps, flanker David Pocock, lock James Horwill and Matt Toomua.
First-five Cooper missed a penalty with a poor kick after the Wallabies pack had won a rare decision at the scrum, however, and the Springboks continued to defend fiercely.
The Wallabies hammered away at the wall of green shirts, though, and finally found a way through six minutes from time when Hooper barged over the line to set up the dramatic finale.