Photo/Illutration Japan's Kaoru Mitoma celebrates after scoring a goal during the World Cup 2022 play-off soccer match between Japan and Australia at Stadium Australia in Sydney, Thursday, March 24, 2022. (AP Photo)

SEOUL, South Korea (AP) — Japan qualified for a seventh straight World Cup by beating Australia 2-0 Thursday and ended the Socceroos’ chances of automatic qualification.

The result in Sydney also qualified Saudi Arabia from Group B.

Japan has 21 points in the group, two more than the Saudis ahead of their match against China later Thursday.

Australia remains in contention for a playoff spot in third place. The Aussies face a playoff against the third-place team from Group A and a possible final game against South American opposition.

Substitute Kaoru Mitoma scored two late goals for Japan after Takumi Minamino came close on five occasions.

Mitoma came on in the 84th minute and scored in 89th after a pull back from Miki Yamane. His low shot then bobbled under Australia goalkeeper Mat Ryan in injury time.

“The win was the result of the players preparing hard and working hard and I hope the fans at home can share in the joy,” Japan coach Hajime Moriyasu said.

Australia nearly took the lead in the first half when Gianni Stensness headed in a corner but the referee ruled that Trent Sainsbury fouled goalkeeper Shuichi Gonda.

“It’s obviously disappointing,” Australia coach Graham Arnold said. “But at the 87th minute, 0-0 was still not good enough to qualify so we opened ourselves up and went four up front and gave them too much space, and at the end of the day they are a quality team and probably the better team on the night.”

Australia now has to focus on qualifying for the World Cup via the playoff route for a second straight time.

“We have got the third place spot and you have to be positive about that,” Arnold said. “We did that in 2018 and we just have to move forward.”

In the group’s other fixtures, Saudi Arabia drew 1-1 with China while Oman won 1-0 against Vietnam in Hanoi.

In Group A, South Korea defeated Iran 2-0 in Seoul to move into first place. Son Heung-min and Kim Young-gwon scored a goal each.

Both teams had already secured their World Cup spots — South Korea for the 10th straight time.

A second-half goal by Hussein Ali gave Iraq a 1-0 win over the United Arab Emirates in Riyadh to move the team into fourth place, one point behind the host in third.

Also, last-place Syria defeated Lebanon 3-0 in Sidon in a game that was suspended for around 30 minutes in the second half due to crowd disturbances.