England have been drawn in the same group as Italy - the team that beat them in the Euro 2020 final - in qualifying for Euro 2024 in Germany.
Ukraine, North Macedonia and Malta are the other teams in Group C.
Scotland will be in Group A along with Spain, Norway, Georgia and Cyprus.
Wales will face Croatia, Armenia, Turkey and Latvia in Group D, while Northern Ireland are joined by Denmark, Finland, Slovenia, Kazakhstan and San Marino in Group H.
The Republic of Ireland face a tough task as they are in Group B alongside the Netherlands and France, plus Greece and Gibraltar.
At the draw in Frankfurt, there were gasps when England were pulled out to face Italy, with the Azzurri having beaten Gareth Southgate's side on penalties at Wembley to win the Euro 2020 final.
Italy will also face North Macedonia, who beat Roberto Mancini's side in their 2022 World Cup play-off in March.
Scotland have qualified for three European Championships - in 1992 and 1996, and for Euro 2020, which was delayed by a year because of the coronavirus pandemic.
They are guaranteed at least a play-off place after finishing top of their Nations League group and earning promotion to the top tier of that competition.
Scotland's game against Norway will see them face Manchester City's in-form striker Erling Haaland.
Wales made their European Championship finals debut in 2016 when they reached the semi-finals.
Northern Ireland were the only home nation not to qualify for Euro 2020, with their only finals appearance having come in 2016.
How does it work?
There are seven groups with five countries - and three groups with six teams in them. The four Nations League finalists - Croatia, the Netherlands, Italy and Spain - have gone into the smaller groups.
The top two teams in each of the 10 groups qualify directly for Euro 2024.
Germany automatically qualify as hosts, while the remaining three teams will come via the Nations League play-offs.
The groups start on 23 March and end on 21 November 2023.
The groups 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 Rep, 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
More to follow.