Scotland moved up to fourth in the world rankings with a fabulous victory over Australia in Sydney.
Duncan Taylor and Finn Russell scored first-half tries for the visitors, with Israel Folau replying twice.
The hosts nudged ahead when Will Genia found a gap in the stout Scottish defence.
But Scotland responded with a wonderful try finished off by Hamish Watson to make it two wins from two for new head coach Gregor Townsend.
It was a second successive Scottish win on Australian soil following their 2012 success in Newcastle and revenge for one-point defeats at Murrayfield last year and at the 2015 World Cup.
Scotland’s fantasy start began with a long-range Greig Tonks penalty after the Wallabies were done on the floor. Their mood went up another notch when Bernard Foley, the goal-kicking machine who has haunted them in recent times, missed an easy chance to level it.
Spirits soared ever higher when a three-point lead became 10 after quarter of an hour. The score was a catastrophe for the Australians and a delicious piece of poaching for the Scots.
Under pressure, Genia lobbed an awful pass to Tatafu Polota-Nau who, under even more pressure, attempted a decidedly unwise pop pass which was gobbled up by Taylor.
The centre ran away to score a gift of a try and when Russell converted Scotland, improbably, led 10-0.
Australia hit back when Scotland got their defensive alignment all wrong; Foley flinging a long pass to Folau who motored through a giant gap to touch down at the posts. Foley’s extras narrowed the gap further.
It was an intriguing game already and it got even more interesting when Russell galloped downfield on his lonesome, only to be taken out by Foley who got binned as a consequence. While he was away, Scotland once again fed off another colossal Wallaby blunder.
Trying to clean his ground from a scrum, Genia failed to spot Russell tearing up on him. Russell blocked the kick, gathered and then ran around to score behind the posts. His conversion was a formality.
Australia managed to get hands on the ball and dominate for a spell after Russell’s sucker-punch. They piled on the pressure and in the midst of the heat, Ryan Wilson sacrificed himself at a breakdown, saving a potential try but getting binned for his troubles. Scotland’s penalty count was rising alarmingly as was the threat to their line.
Eventually, they broke when Foley picked out Folau with a cross-field kick, the full-back springing a mile in the air above Tonks to score. Foley, again, missed a straightforward kick.
Scotland battled tremendously to survive the rest of Wilson’s binning without scoring. The bench then appeared and on came Ross Ford for his record-equalling 109th cap. There was a siege on the visitors’ line going on when Ford entered the match and it continued awhile.
Camped inside the Scottish 22, Foley had a blast but was repelled, Michael Hooper had a go but was halted, Tevita Kuridrani went for it but he was stopped, too.
It couldn’t last. Genia finally went over, Foley converted and Australia led for the first time.
You wouldn’t have given Scotland much of a chance at that point. All the momentum belonged to the Wallabies, all the match was being played in Scotland’s half. They were hanging on, hanging on, hanging on, then they were breaking free.
Watson’s try was a thing of wonder, a breakaway of skill, composure and lethal finishing. Tonks, Lee Jones and Taylor cut their way through and it was Taylor who drew Australia’s last man and popped it to Watson. With the conversion, banged over brilliantly by Russell, their cushion was five points.
An epic. Who would have thought it. Scotland were pushed onto the back foot again. Some of the defence was last-ditch and magnificent. It wasn’t about systems now, it was about heart.
Matt Scott pulled off a try-saver, so did Russell. Scotland escaped, cleared their lines and within seconds the traffic started heading one way again.
Australia had a 5m line-out with five minutes left. They coughed it up. They got it back and attacked right and left and right and left, Scotland staying with them all the way. The scale of the Scottish defence was vast, a monumental effort.
The Wallabies had one last chance. Scotland were done at the breakdown as the Allianz Stadium erupted. They went for touch and rumbled. Foley went, then Kuridrani, then Hooper. No way through, not this time. No sweep of Foley’s boot, no late heartbreaker. This was Scotland’s day. And what a day.
Australia: Israel Folau; Dane Haylett-Petty, Tevita Kuridrani, Karmichael Hunt, Eto Nabuli; Bernard Foley, Will Genia; Tom Robertson, Tatafu Polota-Nau, Allan Alaalatoa; Sam Carter, Adam Coleman; Ned Hanigan, Michael Hooper (capt), Scott Higginbotham.
Replacements: Stephen Moore, Scott Sio, Sekope Kepu, Rory Arnold, Richard Hardwick, Joe Powell, Quade Cooper, Reece Hodge.
Scotland: Greig Tonks; Lee Jones, Alex Dunbar, Duncan Taylor, Rory Hughes; Finn Russell, Ali Price; Gordon Reid, Fraser Brown, Zander Fagerson; Ben Toolis, Jonny Gray; John Barclay (capt), Hamish Watson, Ryan Wilson.
Replacements: Ross Ford, Allan Dell, WP Nel, Tim Swinson, Josh Strauss, Henry Pyrgos, Ruaridh Jackson, Matt Scott.