As a precondition to admission , the border with Gibraltar was reopened in 1985 after a 16-year hiatus , and Spain was admitted to the EU in 1986 .
The border was closed and Spain was banned from the EU .