The Socceroos have won a spot in the World Cup after defeating Peru in a penalty shootout.
Peruvian substitute Edison Flores went closest to breaking the deadlock for either team before the shootout, with a header that hit the post in the second half of extra-time.
The match finished 0-0 after 120 minutes.
Australia coach Graham Arnold then gambled by bringing on Sydney FC goalkeeper Andrew Redmayne for the shootout, replacing captain Maty Ryan just before full time.
Redmayne turned out to be the hero, making the winning save as Australia won the shootout 5-4.
Before that, Aaron Mooy, Craig Goodwin, Ajdin Hrustic, Jamie Maclaren and Awer Mabil all scored from the spot to make up for Martin Boyle’s miss.
An emotional Arnold called the win “one of the greatest achievements ever”.
“It’s been tough, but we did it,” he said as the crowd celebrated inside Qatar’s Ahmad bin Ali Stadium.
He added: “No one knows what these boys have been through to get to here … the way they’ve stuck at it – the way they’ve committed themselves to it – incredible.”
Australia will face Denmark, France and Tunisia at November’s World Cup, which will also be held in Qatar.
It’s the fifth time in a row Australia will be at the World Cup finals.
Earlier, Australia made the early running in a stadium dominated by Peruvian fans, with Mitch Duke flashing a couple of early efforts past the goal while Scottish-born winger Boyle was dangerous out on the right.
The first shot on target for either team came via Hrustic in the 81st minute but his long-range free kick was easily claimed by Peru captain Pedro Gallese.
Four minutes later, Aziz Behich just failed to bend a skidding effort on target after the left-back picked up a loose ball and beat two Peruvians before having a shot from outside the box.
Hrustic nearly stole the win for Australia in the 88th minute when he was found by substitute Mabil’s cutback but Gallese just managed to keep the midfielder’s shot from squirming in.
Flores had Peru’s first shot on target in the game in the first period of extra-time before his header hit the post.
Arnold then turned to Redmayne moments before the final whistle, in a decision which will now go down in Australian sporting folklore.
“The doubters don’t bother me. It’s these boys that I care for …” Arnold added.
“I called out Anthony Albanese the other day, to give everyone, give the fans a day off to celebrate this because I believe this is one of the greatest achievements ever, to qualify for this World Cup the way we’ve had to go through things.
“Twenty World Cup qualifiers and we’ve played 16 away from home. It’s been tough but we did it.”