Europe's governing football had already decided in December that the reigning champions and the overseas British territory would be kept apart in the qualifying groups.
Gibraltar became a full UEFA member last year after a 14-year court battle against opposition from Spain and Belarus, but the sovereignty of the 29,000-population territory remains a contentious political issue.
Spain and Great Britain are at loggerheads over 'the Rock', as Gibraltar is known, and have squabbled over issues including border crossing delays and fishing rights.
As a result, even though Gibraltar's name was drawn for Group C in Nice, France, it was immediately moved to Group D where it will face Scotland, the Republic of Ireland, Germany and Poland.
Don't miss stories about Spain, join The Local on Facebook and Twitter.
Spain, who won EURO 2008 and EURO 2012 and hasn't lost a European game since 2006, will be confident of qualifying from a group which includes Ukraine, Slovakia, Belarus, FYR Macedonia and Luxembourg.
Tensions between the UK and Spain flared in July when Gibraltar boats dumped blocks of concrete in disputed waters used by Spanish fishermen.
Gibraltar said it was creating an artificial reef that would boost fish populations and Spain complained the blocks threaten the livelihoods of Spanish fishermen.
Spain also blamed Gibraltar for an increase in tobacco smuggling to the Spanish mainland.
Madrid subsequently stepped up border checks, leading to huge queues for motorists, in what Britain and Gibraltar charged were a retaliatory measure aimed at choking the territory's economy.
Spain ceded Gibraltar to Britain in 1713 but has long argued that it should be returned to Spanish sovereignty. London says it will not do so against the wishes of Gibraltarians, who are staunchly pro-British.
Member comments