Australia overturned a 13-point deficit to beat South Africa 24-20 in an enthralling Rugby Championship contest in Brisbane on Saturday.
The TMO awarded Tevita Kuridrani a try after the final hooter, which capped a brave comeback by the hosts, who had trailed 20-7 early in the second half.
The sides scored a try apiece late in the first half via Adam Ashley-Cooper and Eben Etzebeth but two early penalties from the boot of Handré Pollard meant the Boks led 13-7 at the interval, which was a fair reflection of the opening 40 minutes.
The South African scrum was on top and their loose trio were doing well at the breakdown, although Israel Folau proved a threat every time he touched the ball for the hosts.
Test debutant Jesse Kriel announced his arrival on the international scene with a fabulous try early in the second period but the visitors were made to do a huge amount of defending as Australia swung the territory and possession stats around.
A change in front-row personnel on both sides ended the Springboks' set-piece dominance and the tandem threat of Michael Hooper and David Pocock helped the Wallabies hang onto the ball in the last half hour.
Hooper muscled his way over in the dying minutes to set up a grandstand finish, before Kuridrani managed to get the tip of the ball down on the chalk to snatch victory in dramatic style.
Two poor kicks by Pollard made for a poor start for the Boks but a great steal on the deck from Bismarck du Plessis relieved the pressure. Those early incidents would be repeated a few times as Pollard blew hot and cold, while Du Plessis made a big contribution.
Pollard's willingness to take the ball to the line did however earn the visitors the first penalty but the young fly-half hit the upright with what should have been an easy kick.
South Africa let another chance slip after a strong scrum set up a break for Damian de Allende which put Australia under pressure. The centre should have given it to JP Pietersen out wide and a few phases later Pollard was left red-faced when he knocked on with the visitors pressing.
The first points came on the quarter-hour mark as Pollard landed a penalty after Hooper was adjudged to be offside in a marginal call.
Scott Higginbotham would have been angry with himself for rushing a chip ahead with the Springbok midfield exposed, leaving the enterprising hosts scoreless at the end of the first quarter.
The Boks were dealt a massive blow when Victor Matfield was forced off with a hamstring injury but Lood de Jager was impressive on his return from a long injury layoff.
Under-pressure Jannie du Plessis and co. also came good to win a scrum penalty that allowed Pollard to double the lead.
Quade Cooper missed a long-range penalty against Bismarck du Plessis at a ruck but the Wallabies took the lead thanks to a slick backline move with half time approaching.
Matt Giteau and Cooper combined before Ashley-Cooper came in on the angle to collect Cooper's inside ball and slip between Pollard and De Allende for a great try. Cooper converted to put the Aussies 7-6 up.
South Africa would head into the break in front, however, thanks to an equally good try. Bryan Habana did well to flick Pollard's chip ahead back for Willie le Roux, who drew three defenders before offloading to Etzebeth, who crashed over in the corner. Pollard found the target with the touchline conversion.
The Wallabies survived a late onslaught thanks to ruck steal on their own tryline to keep the gap at six points heading into the changing rooms.
Will Genia was an injury casualty when the teams reemerged and his replacement, Nick Phipps, missed a tackle as the Boks grabbed a second try.
Credit to Kriel though, as he showed wonderful feet and pace to zigzag past three defenders after latching onto Habana's offload. Pollard landed another excellent conversion to put the Boks well ahead at 20-7.
Cooper cut the deficit to 10 points when the otherwise excellent Ruan Pienaar was penalised for offside but the Wallaby fly-half was way off target after Adriaan Strauss was pinged for dropping a knee to the ground at scrum time.
Rob Simmons lost the ball in contact just short of the line but the Wallabies were rewarded for their sustained pressure after a series of strong scrums set up Hooper's try as he beat the tackle of Oupa Mohoje to get the ball over the whitewash.
Giteau added the conversion but missed a long-range effort that would have pulled the Wallabies level.
Australian skipper Stephen Moore made a brave decision to go for the corner from a last-minute penalty before Kuridrani was able to dot the ball down for a millisecond, despite the best efforts of Schalk Burger to hold it up.
Man of the match: A few candidates on both sides but we'll go for Israel Folau, whose counter-attacking gave the Springboks zero respite and limited their exit options.
Moment of the match: The game looked lost but Kuridrani's try at the death gave Wallaby coach Michael Chieka a win in his first Test on home soil.
Villain of the match: No nasty stuff to report.
Tries: Ashley-Cooper, Hooper, Kuridrani
Cons: Cooper 2, Giteau
For South Africa:
Tries: Etzebeth, Kriel
Cons: Pollard 2
Pens: Pollard 2
Australia: 15 Israel Folau, 14 Adam Ashley-Cooper, 13 Tevita Kuridrani, 12 Matt Giteau, 11 Rob Horne, 10 Quade Cooper, 9 Will Genia, 8 Scott Higginbotham, 7 Michael Hooper, 6 Scott Fardy, 5 Rob Simmons, 4 Will Skelton, 3 Sekope Kepu, 2 Stephen Moore (c), 1 James Slipper.
Replacements: 16 Tatafu Polota-Nau, 17 Scott Sio, 18 Greg Holmes, 19 James Horwill, 20 David Pocock, 21 Nick Phipps, 22 Matt Toomua, 23 Drew Mitchell.
South Africa: 15 Willie le Roux, 14 JP Pietersen, 13 Jesse Kriel, 12 Damian de Allende, 11 Bryan Habana, 10 Handré Pollard, 9 Ruan Pienaar, 8 Schalk Burger, 7 Marcell Coetzee, 6 Francois Louw, 5 Victor Matfield (captain), 4 Eben Etzebeth, 3 Jannie du Plessis, 2 Bismarck du Plessis, 1 Tendai Mtawarira.
Replacements: 16 Adriaan Strauss, 17 Heinke van der Merwe, 18 Frans Malherbe, 19 Lodewyk de Jager, 20 Teboho Mohoje, 21 Cobus Reinach, 22 Pat Lambie, 23 Lwazi Mvovo.
Venue: Suncorp Stadium, Brisbane
Referee: Nigel Owens (Wales)
Assistant referees: Glen Jackson (New Zealand), Mike Fraser (New Zealand)
TMO: Ben Skeen (New Zealand)