What Countries Border Portugal? Spain on Land, and Who Lies Across the Sea
Geography Guides

What Countries Border Portugal? Spain on Land, and Who Lies Across the Sea

Spain is Portugal’s only land neighbour, along the 1,214 km Raia first drawn in 1297. At sea, Portugal meets Spain off Galicia, in the Gulf of Cádiz and near the Canaries.

Geography Worlds
March 27, 2026
Updated October 6, 2026
7 min read

Portugal has only one land neighbour: Spain, which wraps around the country’s northern and eastern sides along a border of about 1,214 km (Wikipedia’s table of land borders) to 1,234 km (its article on the border itself). It is the longest continuous international border inside the European Union and one of the oldest in the world, first drawn by the Treaty of Alcañices in 1297. Everywhere else Portugal faces the Atlantic. At sea its neighbours are Spain again, off Galicia, in the Gulf of Cádiz and between Madeira and the Canary Islands, with Morocco about 520 km east of Madeira. Two disputes have marked the relationship: the town of Olivenza on land, which is still unresolved, and the effect of the Savage Islands on the sea boundary, which Spain contested until about 2015.

Map of Portugal and its land neighbour Spain
Portugal (teal) and its one land neighbour (blue): Spain. Map: Geography Worlds, from Natural Earth boundary data.

The Raia: Portugal’s single land border with Spain

The Portuguese call the border A Raia and the Spanish call it La Raya, both meaning “the stripe”. It runs from the mouth of the Minho on the Atlantic in the north, along Portugal’s northern edge, then turns south and follows the country’s eastern side down to the mouth of the Guadiana on the Gulf of Cádiz. Ten Portuguese districts touch it: Viana do Castelo, Braga, Vila Real and Bragança in the north, Guarda and Castelo Branco in the centre, Portalegre, Évora and Beja in the Alentejo, and Faro in the Algarve. Seven Spanish provinces lie on the other side: Pontevedra and Ourense in Galicia, Zamora and Salamanca in Castile and León, Cáceres and Badajoz in Extremadura, and Huelva in Andalusia.

For a country with a land area of 92,225 km², that is a long frontier. Its land faces only Spain and its coast faces the open Atlantic, so Spain is the only neighbour it has ever had to agree a land border with.

Minho, Douro, Tagus and Guadiana: four rivers as border

Long stretches of the Raia follow rivers, and four of the peninsula’s great rivers mark parts of it.

  • Minho (Miño). The 340 km Minho, the longest river in Galicia, forms the northernmost section, dividing the Portuguese Minho region from Galicia until it reaches the sea between Caminha and A Guarda.
  • Douro (Duero). For 112 km the Douro forms the border through a region of narrow canyons. Portugal protects its bank as the Douro International Natural Park, 868 km² across Miranda do Douro, Mogadouro, Freixo de Espada à Cinta and Figueira de Castelo Rodrigo, while Spain’s side is the Arribes del Duero Natural Park. Five dams sit on this border stretch: Miranda, Picote and Bemposta, run by Portugal, and Aldeadávila and Saucelle, run by Spain.
  • Tagus (Tajo). The Iberian Peninsula’s longest river forms only a short 47 km stretch of the border before it enters Portugal and flows on to Lisbon.
  • Guadiana. The 829 km Guadiana marks a long stretch in the south, separating the Alentejo and the Algarve from Extremadura and Andalusia. It reaches the sea between Vila Real de Santo António and Ayamonte.
A boat on the Douro river at the bottom of a deep granite gorge, with Portugal on one bank and Spain on the other
The Douro gorge near Miranda do Douro, where the river forms the Portugal–Spain border between the Douro International and Arribes del Duero natural parks. Photo: Manu Vilela “Cadoalla”, CC BY-SA 4.0, via Wikimedia Commons

Between the rivers the border crosses dry uplands and the open plains of the Alentejo. Most of the land on the Portuguese side is low: more than 70% of mainland Portugal lies below 400 m. The highest point in the country is not on the mainland at all but on Pico in the Azores, at 2,351 m.

From Alcañices in 1297 to the Treaty of Lisbon in 1864

The border’s outline is medieval. The Treaty of Badajoz of 1267, between Alfonso X of Castile and Afonso III of Portugal, made the Guadiana roughly the southern boundary. Thirty years later, the Treaty of Alcañices of 1297 between King Denis of Portugal and Ferdinand IV of Castile settled most of the rest. Portugal gave up Serpa and Moura, gained Olivença, and kept the Algarve, and the line has changed very little since.

Exact demarcation took much longer. The Treaty of Limits was signed in Lisbon in 1864 and ratified in Madrid in 1866. It also ended one of Europe’s oddest territories, the Couto Misto, a group of three villages (Santiago de Rubiás, Rubiás and Meaus) in the Salas valley of Galicia that had for centuries escaped both Portuguese and Spanish control. Its residents were exempt from military service and taxes and could grant asylum to outsiders. The 1864 treaty gave the villages to Spain and a small, uninhabited strip to Portugal. The southern end of the border was settled by a Convention of Limits in 1926, which also took in an 1893 agreement about Moura.

Olivenza: the stretch without border stones

One sector is still undefined. Olivenza (Olivença in Portuguese) lies on the east bank of the Guadiana, 24 km from both Elvas in Portugal and Badajoz in Spain. It was Portuguese from 1297 until 20 May 1801, when French and Spanish troops took it during the War of the Oranges, and the Treaty of Badajoz that followed left it in Spain. Portugal argues that the 1801 treaty lapsed when Spain invaded in 1807, and points to Article 105 of the 1815 Congress of Vienna settlement, which called for the territory’s return and which Spain accepted on 7 May 1817. Spain holds that the Treaty of Badajoz still stands and reads Article 105 as non-binding. Spain administers the area, now split between the municipalities of Olivenza and Táliga.

On the ground, the dispute appears as a gap in the boundary markers. When the joint boundary commission placed stones along the border, work stopped on this stretch of the Guadiana, and markers 802 to 899 were never installed. Portuguese military maps leave the line out here altogether. In practice the issue causes little friction: Olivenza joined Elvas, Badajoz and other neighbouring towns in a cross-border euroregion in 2008.

Crossing the Raia from Valença–Tui to Ayamonte

Portugal and Spain signed the Schengen Agreement in June 1991, and it took effect on 26 March 1995, turning the Raia into an open border. Both countries kept the right to reimpose checks, and Portugal has done so for the Euro 2004 football championship, the 2010 NATO summit in Lisbon, Pope Francis’s visit to Fátima in May 2017, and during the COVID-19 pandemic: from 16 March to 1 July 2020, and again from 29 January to 1 May 2021, when only people with exceptional reasons could cross.

The busiest crossing is Valença–Tui over the Minho, where the main international bridge carries about half of all road traffic between the two countries. The other main road crossings, from north to south, are Vila Verde da Raia–Verín, Quintanilha–San Vitero, Vilar Formoso–Fuentes de Oñoro, Termas de Monfortinho–Cilleros, Marvão–Valencia de Alcántara, Elvas–Badajoz, Vila Verde de Ficalho–Rosal de la Frontera and Vila Real de Santo António–Ayamonte. Some crossings are tiny: a wooden bridge just 3.2 m long links Várzea Grande in Arronches with El Marco in Spain, and a zip line over the Guadiana between Sanlúcar de Guadiana and Alcoutim is the only one in the world that crosses an international border.

The same frontier looks different from Madrid, where it is one of several. Our guide to the countries that border Spain covers it alongside Spain’s other land borders, and the Spain and Portugal size comparison shows how the peninsula is divided.

At sea: Spain off Galicia, in the Gulf of Cádiz and around the Canaries

Portugal is much bigger at sea than on land. Its exclusive economic zone covers 1,727,408 km², the 20th largest in the world and the third largest in the EU. The Azores account for more than half of it.

Azores953,633 km²
Madeira446,108 km²
Mainland327,667 km²
Portugal’s exclusive economic zone by region, total 1,727,408 km². Source: Wikipedia, Exclusive economic zone of Portugal

Spain is Portugal’s main maritime neighbour too. The mainland zone meets Spanish waters off Galicia in the north and in the Gulf of Cádiz in the south, at either end of the land border. Madeira lies just under 400 km north of Spain’s Canary Islands, so the two archipelagos’ zones meet in the open Atlantic. Madeira is also about 520 km west of Morocco, the nearest African coast. The Azores, far out in the middle of the ocean, have no near neighbours; the Azores island guide covers the nine islands in detail. In May 2009 Portugal asked the United Nations to recognise a further 2.15 million km² of continental shelf beyond its 200-mile zone.

The Savage Islands and the Canaries boundary

The one maritime disagreement centred on the Savage Islands (Ilhas Selvagens), a group of two main islands and islets with a combined area of only 2.73 km². They lie about 280 km south of Madeira and 165 km north of the Canaries, and they are Portugal’s southernmost point. They have been a nature reserve since 1971, home to nesting seabirds such as Cory’s shearwater, and the only people living there year-round are reserve staff and scientists.

Aerial view of the flat-topped island of Selvagem Grande ringed by surf in a deep blue Atlantic
Selvagem Grande, the largest of the Savage Islands, seen from the air between Madeira and the Canary Islands. Photo: Syrio, CC BY-SA 4.0, via Wikimedia Commons

Sovereignty over the islands was settled on 15 February 1938, when the Permanent Commission of International Maritime Law ruled in Portugal’s favour, and Spain formally recognised Portuguese sovereignty in 1997 after a series of Spanish military flights over the reserve drew protests from Lisbon. The argument since then has been about the sea around the islands. Portugal draws its economic zone south of the Savage Islands. Spain has argued that they are rocks rather than islands under Article 121 of the UN Convention on the Law of the Sea, which would give them no zone of their own and put the boundary halfway between Madeira and the Canaries. Spain sent a letter making that case to the UN on 5 July 2013. Wikipedia’s article on Portugal’s economic zone describes the Spanish objection as lasting until 2015, while illegal fishing near the reserve has remained a source of friction. In 2025 Portugal gave Madeira’s regional government stronger powers to detain illegal fishing vessels there.

So Portugal’s neighbours come down to a short list: Spain along the whole land border and at three points at sea, and Morocco across the water from Madeira. The 1,214 km Raia, mostly unchanged since 1297 except at Olivenza, is the part to watch on a map, and the Spanish side of the story fills in the rest of the peninsula.