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, Ukraine 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 were not included following their 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 champions 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, and the playoffs will take place in March, 2024.
The top two teams from each group qualify directly with the remaining three spots decided in the play-offs in March, 2024.
The 24-team finals will be held in 10 stadiums across Germany.