
The map of Spain is deceptively simple. At first glance, everything seems obvious: the Pyrenees to the north, the Atlantic and the Mediterranean flanking its sides, Africa not far away. Yet behind this apparent clarity lies a complex geographic kaleidoscope, shaped by centuries-old treaties, military conflicts, dynastic marriages, and remarkable coincidences. The lines dividing Spain from its neighbors are full of anomalies, turning a simple study of the atlas into a fascinating journey through Europe’s most unusual borderlands.
European neighbors: from eternal friendship to enclaves
Spain’s longest and most peaceful frontier is shared with Portugal. This boundary, known as “La Raya,” stretches for over 1,200 kilometers and is considered the oldest unchanged border in Europe. Its outline was fixed as early as the 13th century by the Treaty of Alcañices in 1297, and it has hardly shifted since. Centuries of coexistence have turned the border regions into a unique cultural space, where Portuguese and Spanish villages are so closely intertwined that it’s sometimes hard to tell where one country ends and the other begins.
To the north, in the heart of the Pyrenees, lies the tiny principality of Andorra. It shares just 63 kilometers of border with Spain, but the significance is huge. This stretch is a busy artery for tourists and shoppers, requiring constant cooperation between border agencies. Yet, the most intriguing stories are with France. Beyond the main mountain ridge, there are two true geographic peculiarities here. The first is the municipality of Llívia. After the Treaty of the Pyrenees was signed in 1659, the surrounding villages went to France, but Llívia remained Spanish. The secret was in its status: King Charles I had granted it the title of ‘villa’ (town), and only villages were ceded under the agreement. That’s how a Spanish enclave of about 1,500 people came to be, entirely surrounded by French territory, and accessible from Spain only by a special corridor road.
The second curiosity is Pheasant Island on the Bidasoa River. This small piece of land is the world’s smallest condominium. Its sovereignty alternates between Spain and France every six months. From February to July, it is Spanish; from August to January, it is French. Despite its modest size, its diplomatic weight is immense. It was here, in 1659, that the Treaty of the Pyrenees ended a long war, and the marriage of Louis XIV to Maria Theresa of Austria took place. The transfer of power ceremony is simple: representatives from the Spanish Irun and the French Hendaye simply exchange documents.
Gibraltar and African outposts: the legacy of empires
At the southern tip of the Iberian Peninsula lies arguably Europe’s most famous border dispute—Gibraltar. This rock came under British control in the early 18th century as a result of the War of the Spanish Succession. The Treaty of Utrecht in 1713 officially transferred the city and port to Britain, but with a crucial caveat: the document made no mention of the isthmus connecting the rock to the mainland, nor of the surrounding waters. For three centuries, this legal loophole has fueled Madrid’s territorial claims. Today, the border with Gibraltar is just 1.2 kilometers long, but thousands of people cross it every day, making it one of the country’s busiest border crossings.
Across the strait from Gibraltar are two Spanish autonomous cities on the African continent—Ceuta and Melilla. Their history dates back to the 15th and 16th centuries. Ceuta was originally a Portuguese possession but stayed with Spain after the breakup of the Iberian Union in 1640. Melilla, on the other hand, was annexed to the Castilian crown even earlier, in 1497. Since gaining independence in 1956, Morocco has claimed these cities as its own. For Spain, they have always held immense strategic value, controlling access to the Mediterranean and serving as bastions in North Africa. Today, these borders are at the center of migration crises and diplomatic tensions.
Micro-territories and the shortest border on the planet
In addition to its major enclaves, Spain also possesses tiny territories that have created the shortest land border in the world. This refers to Peñón de Vélez de la Gomera, a rocky promontory seized from pirates in 1564. Originally an island, a powerful earthquake in 1930 formed a sandy isthmus, physically connecting it to the Moroccan coast and resulting in a border just 85 meters long. Today, Peñón has no civilian population; it is home solely to a small Spanish military garrison, symbolizing Spain’s centuries-long presence in the region.
But that’s not all. Spain retains sovereignty over several island groups off the coast of Morocco: the Alhucemas archipelago, the disputed Isla Perejil, and the Chafarinas Islands. These areas also lack permanent civilian residents, but serve military or administrative purposes. Their status periodically sparks tensions with Rabat and makes Spain the only European country with outposts of this kind on African soil. All these historical and geographical peculiarities turn the kingdom’s border map into a unique puzzle, full of unexpected discoveries.












