Gibraltar was drawn in the same Euro 2016 football tournament qualifying group as Spain – only to be moved to another for political reasons.
The blind draw in Nice, France, briefly saw the British overseas territory paired up with the current European and world champions in Group C.
But European football’s governing body Uefa had already announced in December that Gibraltar and Spain would be kept apart amid continuing political tensions over the territory’s sovereignty.
Gibraltar was switched to Group D, with Scotland and the Republic of Ireland.
The territory, which has a population of just 29,000, became a full member of Uefa last year and will be competing in the qualifying round for the first time.
General secretary Gianni Infantino was quoted as saying: “Gibraltar is a full member and will participate in the draw on February 23, but it will not play against Spain. That was one of the criteria that was decided.”
Armenia and Azerbaijan, who went to war between 1992 and 1994, were also kept apart in the qualifying round for Euro 2012.
Gibraltar first applied for Uefa membership in 1999 but faced opposition from Spain, fearing setting a precedent for Basque and Catalan national teams.
England were handed a straightforward-looking qualifying campaign in Group E and will face Switzerland, Slovenia, Estonia, Lithuania and San Marino.