Mathew Leckie grabbed a fine second-half winner as Australia masterminded a World Cup shock by progressing to the knockout stages with a 1-0 victory that saw off Denmark.
The Socceroos and the Danes were both in danger of exiting the tournament due to Tunisia’s lead against holders France in their other Group D match.
But Leckie had other ideas and delivered the knockout blow for the Danes with a superb solo effort in the 60th minute to send Australia into the round of 16 for the first time since 2006.
The Melbourne City forward ran nearly halfway down the pitch and turned around Joakim Maehle before finishing calmly past Kasper Schmeichel.
Denmark offered little in response, although they were denied a penalty by an offside flag when Algerian referee Mustapha Ghorbal pointed to the penalty spot after Harry Souttar’s foul on Kasper Dolberg.
Graham Arnold’s men, who finished behind France on goal difference, face Argentina in the second round on Saturday.
With the Socceroos starting the day in second place thanks to their victory over Tunisia, the onus to attack fell on Denmark.
The Danes were initially positive and dominated possession against a team 28 places below them in the FIFA world rankings, only to be frustrated in an opening period to forget.
Australia goalkeeper Mathew Ryan turned on Mathias Jensen and unconventionally deflected a dangerous cross from marauding left-back Maehle, while Christian Eriksen dragged wide.
Socceroos manager Arnold had spoken before the game of “putting the game a bit more on the map” at home, as well as his desire to make the Australian crowd smile.
While his compact side was content to sit back and keep things tight, Middlesbrough’s Riley McGree tested Schmeichel on a rare forward foray to show he could cause trouble on the counterattack.
The pattern of play persisted into the second period before a goal in the other Group D match put both teams in grave danger.
News of Tunisian striker Wahbi Khazri opening the scoring against France seemed to have filtered through to Al Janoub Stadium just before Leckie grabbed McGree’s through ball to run wide and finish with aplomb.
Denmark needed at least two goals to avoid leaving Qatar early but, with their lack of cutting edge, even a draw looked unlikely.
Australia suffered a big scare with 19 minutes remaining when substitute Dolberg crashed in the box before the penalty decision was quickly reversed.
The spirited Socceroos, impressively led by Scotland centre-back Souttar, stubbornly defended and deservedly survived six minutes of added time to upset the Euro 2020 semi-finalists and march on.