Scotland will face Hungary, Northern Ireland have been drawn against Croatia, while Wales will take on Slovakia in the first round of play-offs for the Euro 2025 finals in Switzerland.
The Welsh could face the Republic of Ireland, who take on Georgia, in the second round of play-offs if both progress.
Scotland will meet Montenegro or Finland should they defeat Hungary.
Meanwhile, Albania or Norway lie in wait for Northern Ireland if they defeat Croatia.
Northern Ireland, Scotland, Wales and the Republic will all be away from home for the first legs of the play-off first round on 23 October, with the return ties scheduled for a week later.
The round two play-offs will be played on 27 November and 3 December.
Seven places are still to be decided at next year's finals with holders England, Denmark, France, Germany, Iceland, Italy, Netherlands and Spain, plus the hosts, having already qualified as winners or runners-up of their League A qualifying sections.
Scotland and Wales won their League B groups, with Northern Ireland runners-up in theirs and the Republic finished bottom of their League A section.
Pedro Martinez Losa's Scots, currently ranked 23 in the world, will be favourites against a Hungary side who are 20 places behind after finishing third behind Switzerland and Turkey in their group.
Should they progress, they could face old foes Finland, who are three places below in the rankings but beat Scotland twice in Euro 2021 qualifying and also in the final of this season's Pinatar Cup.
Path 1 - League C v League A
Romania v Poland
Greece v Belgium
Montenegro v Finland
Georgia v Republic of Ireland
Slovenia v Austria
Luxembourg v Sweden
Belarus v Czech Republic
Albania v Norway
Path 2 - League B
Turkey v Ukraine
Croatia v Northern Ireland
Bosnia & Herzegovina v Serbia
Azerbaijan v Portugal
Hungary v Scotland
Slovakia v Wales
Azerbaijan or Portugal v Belarus or Czech Republic
Hungary or Scotland v Montenegro or Finland
Turkey or Ukraine v Greece or Belgium
Slovakia or Wales v Georgia or Republic of Ireland
Romania or Poland v Slovenia or Austria
Croatia or Northern Ireland v Albania or Norway
Bosnia & Herzegovina or Serbia v Luxembourg or Sweden