Russia-bound Japan were condemned to a 1-0 defeat away to Saudi Arabia in their final World Cup qualifier on Tuesday night, a result that saw the Gulf state pip Australia for an automatic place at next year's finals.

Substitute Fahad Al Muwallad struck the clincher midway through the second half in front of a raucous crowd of over 62,000 at King Abdullah Sports City Stadium, securing Bert van Marwijk's team second place in Group B ahead of the Socceroos on goal difference.

Australia edged Thailand 2-1 several hours earlier in Melbourne, but their fate rested in the hands of the Japanese, who qualified on Thursday with a 2-0 home victory over Australia to win the group.

Japan only needed to avoid a loss to the Saudis to hand Australia a ticket to Russia, but it was not to be although Vahid Halilhodzic's men had the better of large chunks of the game.

"We wanted to wrap up the qualifiers with a win so I am a bit sad about the result," said Halilhodzic. "I'm not sure whether we deserved to lose looking at our performance. We made a bunch of chances but could not finish them today."

"There was a bit of fatigue in the team and players lost in some one-on-one situations and maybe in attack. And trying to control the ball we weren't bold enough. But this team has room to grow and I want to make the team better heading toward the World Cup."

Third-place Australia head to next month's playoff, where they will face the third-place team from Group A -- war-scarred Syria.

Pachuca midfielder Keisuke Honda was recalled to the starting XI at the expense of Takuma Asano after being benched for the Australia game, one of four changes made by Halilhodzic.

Soccer: Saudi Arabia defeats Japan

Gaku Shibasaki came in for captain Makoto Hasebe, who pulled out of the squad with a sore right knee; Genki Haraguchi replaced Takashi Inui, while Leicester City striker Shinji Okazaki was preferred to Yuya Osako.

Japan started strongly in the sweltering heat and humidity, but Okazaki lost his footing with only the Saudi goalkeeper Abdullah Almayouf to beat after being put through by Haraguchi on nine minutes.

The visitors went close again on 33 minutes as Gen Shoji had a header hacked off the line by Nawaf Al Abid, and Almayouf did well to beat away a shot by Hotaru Yamaguchi five minutes before halftime.

The Saudis rarely threatened in the first period, Mansour Al Harbi's shot just over the bar in the closing stages the nearest they came to breaking the deadlock.

The home side had to scramble another effort off the line, this time from Hiroki Sakai at the start of the second half, before a shot from Haraguchi set the alarm bells ringing again.

Japan keeper Eiji Kawashima produced a tremendous save at the other end to thwart Al Muwallad.

Soccer: Saudi Arabia defeats Japan

But Al Muwallad got it right the second time of asking, bursting through to lash an angled shot past Kawashima in the 63rd minute to send the crowd into raptures.

Van Marwijk admitted there were a few nerves before the Saudis finally qualified for their first World Cup since Germany 2006.

"It is unbelievable that we succeeded in qualifying at home before 65,000 people in a beautiful stadium," said the former Netherlands coach.

"We are all very happy. Japan are a very good team and you saw in the first half that a few times we were lucky. We got stronger and stronger and in the second half, we deserved to win."

Saudi Arabia beat Japan

Japan, who finished the final round with 20 points from 10 games, one point ahead of Saudi Arabia and Australia, have friendlies scheduled in October as they build for Russia.

Halilhodzic's side face yet-to-be-decided opponents in Toyota, Aichi Prefecture, on Oct. 6 and Haiti in Yokohama four days later. Japan will play two more friendlies in November ahead of the World Cup draw in December, when they will find out their first-round opponents in Russia.

"Getting to the World Cup was our main goal and we are relieved we could do that," said Japan defender Maya Yoshida.

"But we have to improve in the friendlies that we will be playing in October, November and March in the build-up to the finals."