Defending champions Italy will face England in their Euro 2024 qualifying group, a repeat of last year's tournament final, following the draw on Sunday in Frankfurt's Festhalle.
The Italians, who beat England 3-2 on penalties at London's Wembley stadium in 2021 to lift the trophy, will also play North Macedonia, who prevented Roberto Mancini's side from reaching the World Cup, and Malta in Group C.
"I was sure we would end up getting either England or France, but that's fine," Mancini said. "It's a workable group. There won't be any simple games but they are all still to be played."
Group B looks equally difficult with former champions Netherlands and current world champions France drawn alongside 2004 Euro winners Greece, Ireland and Gibraltar.
A total of 53 national associations were included in the draw with Germany already through as hosts.
Russia was not included following its invasion of Ukraine and the suspension of all Russian teams by European governing body UEFA.
Belarus, which has supported Russia's war in Ukraine, was included. They will play Switzerland, Romania, Kosovo, Israel and Andorra in Group I.
This season's Premier League top scorer Erling Haaland's Norway will face three-time champion Spain in Group A, along with Scotland, Georgia and Cyprus.
"We avoid France, England and Serbia from pot two," said Norway coach Stale Solbakken. "We have to be satisfied with that, but we could also have been luckier."
The qualifying group matches will be played from March to November, 2023. The playoffs will take place in March, 2024.
The 24-team finals will be held in 10 stadiums across Germany.
The draw in full:
Group A: Spain, Scotland, Norway, Georgia, Cyprus
Group B: Netherlands, France, Republic of Ireland, Greece, Gibraltar
Group C: Italy, England, Ukraine, North Macedonia, Malta
Group D: Croatia, Wales, Armenia, Turkey, Latvia
Group E: Poland, Czech Republic, Albania, Faroe Islands, Moldova
Group F: Belgium, Austria, Sweden, Azerbaijan, Estonia
Group G: Hungary, Serbia, Montenegro, Bulgaria, Lithuania
Group H: Denmark, Finland, Slovenia, Kazakhstan, Northern Ireland, San Marino
Group I: Switzerland. Israel, Romania, Kosovo, Belarus, Andorra
Group J: Portugal, Bosnia and Herzegovina, Iceland, Luxembourg, Slovakia, Liechtenstein
(FRANCE 24 with AP and Reuters)