Substitute Kaoru Mitoma scored twice in the dying minutes as Japan beat Australia 2-0 on Thursday to book their place at a seventh straight World Cup and in doing so also helped Saudi Arabia qualify.
It was a crushing blow for an understrength Socceroos who now face a perilous play-off to keep alive their hopes of making Qatar.
The game in a wet Sydney looked destined for a draw before Mitoma converted from close range on 89 minutes, and then again after a mazy run in injury time to spark joyous celebrations from the visitors.
Japan's head coach Hajime Moriyasu reacts following the World Cup 2022 play-off match at Stadium Australia in Sydney. AP
"I knew it was going to be a close match so when I was on the bench all I was thinking was, when I got on the field of play I just had to do my job and score a goal," said Mitoma, 24, who plays for Belgium's Union SG on loan from Premier League Brighton.
"I feel really happy for the players and people back in Japan, and everyone who is a Japanese fan."
Victory pushed the Blue Samurai to the top of Asian Group B qualifying on 21 points, six clear of Australia with only one more game to play.
The Saudis, on 19 points, face China in Sharjah later on Thursday but are assured of their place in Qatar courtesy of Japan's win.
Australia now cannot finish higher than third, forcing a play-off against the third-placed team in Asian Group A. The winner will then meet a team from South America for the right to play in Qatar later this year.
Japan started their qualifying campaign with two losses from their first three games, but have now won six in a row.
They headed into the high-stakes clash in front of nearly 42,000 fans at Stadium Australia with a clear edge. Australia's last win over them was in 2009 and Hajime Moriyasu's men claimed a crucial 2-1 victory when the two teams met in October.
Australia were also missing a string of players due to coronavirus impacts or injury, including influential duo Aaron Mooy and Tom Rogic.
In a boost, coach Graham Arnold returned to the sidelines after seven days in self-isolation after testing positive for coronavirus last week, but he was left frustrated.
"It's obviously disappointing that we didn't get the result that we wanted," said Arnold, who has come under pressure from Australia fans.
"But at the end of the day we've got the third place spot and you've got to be positive about that. We've just got to move forward. I've always said I believe in these boys and it's one game at a time."
Agence France-Presse