Australia overcame a stubborn Lebanon side 34-0 to finish Group A with a 100 per cent record and maintain their position as Rugby League World Cup favourites.
The Kangaroos had already sealed their quarter-final spot after victories over England and France, so Saturday's win in Sydney merely confirmed they will meet Samoa in Darwin in the knockout stages.
Lebanon were not disgraced, though, and only found themselves distanced as they tired late on, something they will hope to avoid if they reach the last eight.
The Cedar Trees only need an England victory over France on Sunday to secure their progression and a clash with Tonga - who beat New Zealand on Saturday.
Australia could have been further ahead than their 10-0 half-time lead had errors not crept into their game at crucial points, but Cameron Munster and James Maloney were able to touch down.
More pressure from the Kangaroos eventually broke Lebanon's resolve as Munster and vice-captain Boyd Cordner extended their advantage - the forward collecting Cooper Cronk's grubber kick to score in the corner.
Maloney converted both and Mal Meninga's men rubbed salt into Lebanon's wounds with late scores from Dane Gagai and Tom Trbojevic to wrap up a comfortable win.
Game over. 14-all. Scotland go out on points difference, Samoa through to play @Kangaroos in QF. Heroic effort by depleted Bravehearts.-- Scotland RugbyLeague (@scotlandrl) November 11, 2017
After Tonga's win over the Kiwis secured top spot in Group B, the final qualification place was up for grabs as Scotland faced Samoa in Cairns.
Scotland led 14-6 at the break but their hopes of making the knockout stages were dashed as Matthew Wright and Young Tonumaipea drew Samoa level in the second half.
The 14-14 draw was enough to see Samoa edge past the Bravehearts and claim third place on points difference.