The Socceroos had held on to their one-goal lead for an agonising 30 minutes, after an incredible solo effort from Matthew Leckie gave them the most slender of leads.
12 thousand kilometres away and in the middle of the night in Melbourne's Federation Square, the city exploded with celebrations at full-time.
The noise was deafening. Thousands of fans were lit up by bright red flares.
Among the crowd gathered to watch the match on the big screen was Socceroos icon John Aloisi, who told SBS French's Christophe Mallet Australia has had a very European vibe.
The result means Australia progresses to the knockout stage of the tournament, perched among the top 16 footballing nations in the world.
It was a hard-fought victory for the Socceroos, who faced an increasingly desperate Danish attack in the game's final minutes.
Even the Prime Minister watched on, tweeting in the early hours of the morning as the Socceroos closed out the victory.
With a squad that's captured the imagination of fans around the country and the world, all signs point to Australian football thriving into the future.