Inside the final 10 minutes, Scotland worked into the Australia 22. The visitors were penalised for not rolling away, and a shot at goal was the obvious option.
Another patchy display was not an option. Last weekend Scotland had excelled in the first half against New Zealand before capitulating in the second.
Scotland held off Australia to win narrowly at Murrayfield, taking a tight arm-wrestle in heavy rain.
Flower of Scotland was sung at Murrayfield before kick-off. Smoke from pre-match fireworks hung in the air as the teams set about each other under leaden skies.
Australia would have hoped for anything but the heavy rain they encountered. The limitations of this Wallabies side are well known.
The physical commitment of neither team could be questioned. Scotland made their tackles, and the home side won the contest, just.
Scotland nursed a seven-point lead to the interval.
Australia's hooker was shown a yellow card, and the sanction stayed at yellow. When he returned from his punishment, the scoreboard still showed that seven-point lead for Scotland.
Australia scrum-half Ryan Lonergan attempted a drop-goal but pulled the kick.
It was a narrow home win, built on tackles and a lead Scotland protected, and it was enough to climb the northern hemisphere table.