Japan will play former champions Spain and Germany as well as either Costa Rica or New Zealand at this year's World Cup in Qatar after being slotted into Group E during the tournament draw on Friday.

Japan, 23rd in the latest FIFA rankings, qualified for the seventh straight time and were one of the eight teams in Pot 3.

Screen shows Japan drawn in Group E during the FIFA World Cup Qatar 2022 Final Draw at the Doha Exhibition Center on April 1, 2022 in Doha, Qatar. (Getty/Kyodo)

The 2022 World Cup, the final edition featuring 32 teams, is scheduled to kick off on Nov. 21 with Japan opening their campaign against Germany two days later.

After taking on the 2014 winners, currently ranked 12th, Japan will play the team that emerges from June's intercontinental playoff between the 31st-ranked Costa Rica and New Zealand, which sits one spot outside the top-100, on Nov. 27.

Spain, the winners of the 2010 tournament and the seventh-ranked nation, then await on Dec. 1.

It is the toughest draw at any World Cup to date for Samurai Blue, who made their tournament debut in 1998 and have alternated between group-stage and last 16 exits. They have reached the knockout phase more than any other team from Asia.

"I feel joy in being able to play countries who have experience of winning the tournament in Spain and Germany," said Japan manager Hajime Moriyasu, who revealed he sensed his team would end up in the group with the two European giants as the draw progressed.

"We're aiming to reach the last eight, but we can't get there unless we beat the strongest nations in the world. We'll have a thorough preparation thinking how we can do that."

Japan men's football coach Hajime Moriyasu speaks in the Mixed Zone after the FIFA World Cup Qatar 2022 Final Draw at the Doha Exhibition Center on April 1, 2022 in Doha, Qatar. (FIFA/Getty/Kyodo)

Should Japan reach the last 16, they will face one of Belgium, Canada, Morocco or Croatia from Group F.

Japan stumbled to two defeats from three opening games in their final Asian qualifying group, losing to Oman at home and away to Saudi Arabia, but won the next six to clinch a place in Qatar.

Four-time champions Germany, the nation with the equal second-most World Cup titles alongside 2022 nonqualifier Italy and only behind Brazil's five, suffered a shock group-stage exit four years ago.

But they were the first nation to qualify for the tournament in Qatar after turning their fortunes under former Bayern Munich manager Hansi Flick, appointed to take the reins of his country after the team lost to England in the round of 16 at the European Championships last summer.

Spain, who won the 2010 title thanks to current Vissel Kobe midfielder Andres Iniesta's extra-time winner in the final, struggled in the last two World Cups but are also making progress under former Barcelona manager Luis Enrique.

They reached the semifinals at the European Championships last summer and also finished runners-up in the UEFA Nations League. Japan have long modeled their passing game on the skillful Spanish.

The German and Spanish players will see some familiar faces in the Japan squad with a number of Samurai Blue squad members plying their trade for clubs in both countries.

While Enrique admitted to Kyodo News that he is only really familiar with Germany from the Group E teams after playing them previously, Flick praised the Japanese players who play in the German Bundesliga.

Former Germany striker Oliver Bierhoff, currently the national team director, talked up Stuttgart defensive midfielder Wataru Endo, while former Spain right-back Michel Salgado said Takefusa Kubo, on loan at Mallorca from Real Madrid, can be a difference-maker.

Manager Moriyasu, meanwhile, will also be out to exorcise his national team playing day demons in Doha. The 53-year-old former midfielder was part of the team that suffered a last-minute draw against Iraq in 1993 in the Qatari capital to miss out on the 1994 finals in the United States.

"I want to achieve our goals here in Doha, this time as a manager, and turn it into the 'Joy of Doha,'" said Moriyasu, recalling the match that has become known in Japan as the "Agony of Doha."

The 2026 World Cup, to be co-hosted by Canada, Mexico and the United States, will be expanded to 48 nations.

The final draw for the FIFA World Cup football tournament in Qatar is held on April 1, 2022, in Doha. (Kyodo) ==Kyodo