Spain was the last country to join NATO once its democratic restoration gained enough momentum, following the Dictator Franco's death in 1975, to hold a national referendum on the subject. Although strongly opposed by a strong socialist opposition, which came into government that year, the plebiscite voted for joining NATO.
Spain has fractious relationships with the United Kingdom over Gibraltar and Portugal over the Savage Islands and the town of Olivenza on the border between the two countries. Other NATO countries have deep seated issues over Spain's fascist history which required significant work to overcome during its integration with the military alliance. Close relations with the US and France however, counterbalanced these issues, the major US fleet base at Rota Spain and air facilities in the Canary Islands ensure continued US support.
Other territorial disputes with Morocco have a minor impact on the Spanish Military, in particular Perejil Island in the Strait of Gibraltar, several other small islands and the Spanish held territories of Ceuta and Melilla.