Scotland suffered yet more late heartache against Australia as they fell to a narrow 23-22 defeat at Murrayfield.

The Dark Blues were looking to avenge their controversial exit at last year's World Cup at the hands of the Wallabies.

Referee Craig Joubert found himself named public enemy number one north of the border after wrongly handing Bernard Foley a late penalty to seal that last-gasp quarter-final victory.

This time there was no blunder to blame but Foley was again the man who punished Scotland, kicking over the conversion to put the Wallabies ahead for the first time with just four minutes left, after Tevita Kuridrani's bulldozing run ended with an outstretched arm over the whitewash.

Scotland were looking to kick-off head coach Vern Cotter's farewell tour with a victory and it all looked so promising when 22-year-old centre Huw Jones marked his home debut with a impressive double either side of a Reece Hodge score for the visitors.

Jonny Gray extended Scotland's lead early in the second half but a Wallabies line-up, full of confidence after destroying Wales last week, ultimately refused to lie down even when they were reduced to 14 men in the closing stages.

Yet Scotland will reflect positively after a team tinged with inexperience put on a show that mixed maturity with verve.

Ross Ford was given the honour of leading out the Scots on the afternoon of his 100th cap.

Hogg couldn't stop yet another agonising defeat (Getty)

Three RAF fighter jets then soared over Murrayfield before kick-off but the home side were quickly launching a bombing raid of their own.

They came close to an early breakthrough when Alex Dunbar's surge almost opened up the Aussie defence but in the end the Dark Blues were forced to settle for a Greig Laidlaw penalty.

Australia were in no mood to hang about though and came roaring forward. A couple of missed tackles allowed them to close to within a yard of the tryline before Sekope Kepu coughed up the ball just as a try seemed inevitable.

It was a demonstration though that Scotland would have to be at their peak if they were to have any chance.

Thankfully in Finn Russell, they have a genius fly-half operating at the peak of his powers.

The Australians' line-speed was rapid but the Glasgow stand-off's thinking was even quicker as he clipped a clever chip over their heads into the space behind.

The bounce was kind for Jones as it leapt straight into his grasp, leaving the Stormers centre to gallop in unchallenged under the posts after eight minutes, with Laidlaw converting.

The Scots were moving the ball at breakneck speed but that only made the collisions more dangerous. Ryan Wilson limped off after just five minutes while Richie Gray was also forced off for a spell after a bang to the head.

Hodge scored in the first half (Getty)

In the confusion, the Wallabies hit back. Israel Folau and Dane Haylett-Petty did the damage with a clever exchange of passes and with the Scots struggling to get themselves into covering positions, Hodge dived over after 12 minutes.

Foley added the extras before drawing the sides level with a penalty, while Laidlaw could only skew wide with a kick of his own

Michael Cheika's men were starting to pick holes in the Scottish defence with worrying regularity.

But when they left their own back door unlocked, Scotland pounced. Prop Zander Fagerson popped a pass to Jones 10 yards out and with a faint of his shoulder he gave Kuridrani the slip before scampering in for his second touchdown on 27 minutes, with Laidlaw again converting.

A Foley penalty early in the second period trimmed back the deficit but it was the Scots who were celebrating again after 47 minutes.

Stuart Hogg launched himself on a sprint down the right flank but while his run was stopped five yards out, not even a five-strong posse of Aussies could prevent giant lock Jonny Gray from thundering over.

Laidlaw's conversion, however, came back off the upright.

The Wallabies were never going to accept defeat and continued to probe.

The Wallabies celebrate their first try (Getty)

Foley added another penalty but Scotland were forced to readjust when flanker John Hardie - who had replaced Wilson - was himself stretchered off. Lock Grant Gilchrist went on in his place as a makeshift back-rower.

Australia's bid to fight their way back into proceedings was not helped when substitute Will Skelton got himself sin-binned with 12 minutes remaining for a late shoulder barge on Jonny Gray.

Yet they did not let their numerical disadvantage dissuade them and they grabbed the crucial try with four minutes remaining. From a ruck, Foley fed the ball to Kuridrani and he slipped past both Peter Horne and Hogg to dot the ball down next to the posts.

That left it to Foley, who did the damage with a late penalty in that dramatic Twickenham clash 12 months ago, to repeat the act as he nailed the conversion which handed Australia the win.