The pair are in Group 3 in League A, which also includes Croatia, Spain's opponents in the 2023 Nations League final, and the Czech Republic.
England, who were promoted back to the Nations League's top division after winning their group in League B, are also placed in the same group as Croatia in this year's World Cup.
France and Italy were grouped together for the second straight time in the Nations League, being in a difficult Group 1, which also has Turkey and former semi-finalists Belgium.
Germany were grouped with former finalists Netherlands in Group 2, while defending champions Portugal were pitted against Denmark, Norway and Wales in Group 4.
Russia were excluded from the competition due to the country's invasion of Ukraine.
Following is the draw for the 2026-27 UEFA Nations League made on Thursday.
League A
Group A1: France, Italy, Belgium, Turkey
Group A2: Germany, Netherlands, Serbia, Greece
Group A3: Spain, Croatia, England, Czech Republic
Group A4: Portugal, Denmark, Norway, Wales
League B
Group B1: Scotland, Switzerland, Slovenia, North Macedonia
Group B2: Hungary, Ukraine, Georgia, Northern Ireland
Group B3: Israel, Austria, Ireland, Kosovo
Group B4: Poland, Bosnia, Romania, Sweden
League C
Group C1: Albania, Finland, Belarus, San Marino
Group C2: Montenegro, Armenia, Cyprus, Latvia/Gibraltar*
Group C3: Kazakhstan, Slovakia, Faroe Islands, Moldova
Group C4: Iceland, Bulgaria, Estonia, Luxembourg/Malta*
League D
Group D1: Gibraltar/Latvia*, Malta/Luxembourg*, Andorra
Group D2: Lithuania, Azerbaijan, Liechtenstein
(*Gibraltar and Latvia, as well as Malta and Luxembourg, will compete in relegation playoffs to determine which teams will be relegated to League D)
