You Won’t Believe the Weird Hidden Neighbors Inside Spain’s Borders
Spain looks straightforward on a map. France sits to the north, Portugal to the west, and water surrounds almost everything else. It seems easy to understand, even though the reality is far messier. Spain’s borders conceal a complex network of neighbors, overlaps, and arrangements that are not typical of most borders.
It becomes complicated once you take into account centuries of treaties, geography, and political compromises. Spain doesn’t just border countries in the usual sense. In several places, it surrounds them, shares territory with them, or meets them far from the mainland.
A Spanish Town Completely Surrounded by France

Image via Wikimedia Commons/Medol
Spain borders five countries in total: France, Portugal, Andorra, Morocco, and the United Kingdom. Some of those borders are expected. Others require a closer look at history.
Several of these boundaries were shaped by treaties written centuries ago. Once agreed upon, they stayed in place, even when the results felt awkward or impractical by modern standards.
In the Pyrenees mountains sits Llívia, a Spanish town entirely surrounded by French territory. Despite being cut off from the rest of Spain, it remains Spanish in every official sense. Residents use Spanish services, adhere to Spanish law, and participate in Spanish elections.
This arrangement dates back to the Treaty of the Pyrenees in the 1600s. Spain agreed to hand over the surrounding villages to France, but Llívia was excluded because it was legally classified as a town rather than a village. The wording mattered, and the border has stayed the same ever since.
An Island Governed on a Six-Month Schedule

Image via Wikimedia Commons/Ignacio Gavira
Along the Bidasoa River, which forms part of the border between Spain and France, lies the island of Pheasant. It is small, uninhabited, and known for one unusual rule. Spain and France take turns governing it every six months.
From February through July, the island is Spanish. From August through January, it becomes French. This shared system has existed for centuries and remains uncontroversial. There are no residents, buildings, or border crossings; just a long-standing agreement that remains in effect.
Andorra’s Unique Place Between Two Countries
Between Spain and France, there is Andorra, one of Europe’s smallest countries. It has a population of under 80,000 people and occupies a compact stretch of the Pyrenees.
Andorra is a parliamentary co-principality with two symbolic heads of state: the President of France and the Bishop of Urgell, a Catholic bishop based in Spain. The bishop represents a historic religious role rather than the Spanish government itself. This unusual political structure has remained intact for centuries.
Spain and the United Kingdom Share a Land Border
Spain and the United Kingdom share a land border at Gibraltar, located at the southern tip of the Iberian Peninsula. Gibraltar has been under British control since 1713 and covers just a few square miles.
Its position overlooking the entrance to the Mediterranean has given it lasting strategic importance. The border between Spain and Gibraltar is short but heavily traveled, and it remains one of the most politically sensitive boundaries in Europe.
Spain’s Borders Reach the African Continent

Image via Wikimedia Commons/Soufiane elkadaoui
Spain maintains a direct land connection with Africa through the autonomous cities of Ceuta and Melilla, both located on the North African coast and bordering Morocco. These cities are Spanish territory and part of the European Union.
As a result, Ceuta and Melilla form the only land border between the European Union and the African continent. The distinction gives Spain a unique geographic role within the EU.
One of Spain’s smallest borders is located at Peñón de Vélez de la Gomera, a Spanish sovereign territory situated off the coast of Morocco. It was originally an island, but a storm in the 20th century deposited enough sand to connect it to the mainland.
The shift created a land border just 85 meters long. Peñón de Vélez de la Gomera is not an autonomous city like Ceuta or Melilla, but one of several Spanish sovereign territories known as plazas de soberanía.