Relations · North Africa and Europe

Morocco-Spain relations

MixedClose partners, strained by Ceuta in 2026

Morocco and Spain are close partners but not allies, and a mass crossing into Ceuta and Moroccan ministers' renewed claims to Ceuta and Melilla strained their ties in 2026. Spain has been Morocco's largest trade partner since 2012, and the two countries will co-host the 2030 World Cup with Portugal. They face each other across the Strait of Gibraltar, about 14 km wide at its narrowest. Spain fought Moroccan forces in three wars between 1859 and 1958. Spain still holds Ceuta and Melilla on Morocco's coast, and Morocco claims both cities.

Updated November 18, 2026 · Trade data from CEPII BACI, votes from the UN

The mud-brick ksar of Ait Benhaddou climbing a hillside above palm trees and a dry riverbed The Alhambra lit up at dusk on its wooded hill in Granada, with the Sierra Nevada behind
The ksar of Ait Benhaddou. Photo: Petar Milošević, Wikimedia Commons, CC BY-SA 4.0 · The Alhambra, Granada. Photo: Holger Uwe Schmitt, Wikimedia Commons, CC BY-SA 4.0
  • 1956Diplomatic relations since
  • $27.4bnGoods traded in 2024
  • 3 wars1859-1860, 1921-1926 and 1957-1958
  • 82%Same UN votes in 2025
  • 1.09 millionPeople born in Morocco living in Spain (2024)
  • 14 kmStrait of Gibraltar at its narrowest

Where relations stand today

Checked November 18, 2026

A mass crossing into Ceuta in July 2026 and Moroccan ministers' renewed claims to the city strained ties that had been at their warmest in years. Both governments still call each other partners, and Ceuta and Morocco are central issues before Spain's November 29 election.

Latest

  • Spain's intelligence service (CNI) told the investigating judge it had found no evidence that Moroccan authorities instigated, planned or coordinated the July crossings. A separate Spanish police report to the same judge names 18 Moroccan officials it calls facilitators.
  • King Mohammed VI told Morocco's parliament that the migration cooperation model with Spain had reached its limits, and he blamed Spanish court rulings for blocking the return of minors. King Felipe VI then visited Ceuta and Melilla for the first time as king and called Ceuta an integral part of Spain.
  • Spain's National Court opened a criminal investigation into the Ceuta crossings, and Judge María Tardón cited a police report on the "total permissiveness" of Moroccan forces. Morocco's Foreign Ministry replied that there were "no facts or reports proving any involvement by the Moroccan authorities."
Map showing Spain and Morocco separated by the Strait of Gibraltar, with Ceuta and Melilla marked on Morocco's coast Morocco Spain Ceuta Melilla

Are Morocco and Spain allies?

What ties them

  • Trade. Spain has been Morocco's largest trade partner since 2012. The two countries traded about $27.4 billion in goods in 2024, up from $1.4 billion in 1995.
  • Energy. Spain pumps gas south to Morocco through the Maghreb-Europe pipeline. During the April 2025 Iberian blackout, Morocco reversed the flow on its power link to help restart Spain's grid.
  • Migration. About 1.09 million people born in Morocco live in Spain, the largest foreign-born group. Morocco cooperates with Spain on border control, and Spain credits Morocco with most returns after the July 2026 crossings.
  • The 2030 World Cup. Morocco, Spain and Portugal co-host the 2030 FIFA World Cup, confirmed in December 2024. Spain will have 11 stadiums, Morocco six and Portugal three.

What divides them

  • Ceuta and Melilla. Spain says Ceuta (Spanish since the 17th century) and Melilla (since 1497) are Spanish cities and part of the EU. Morocco has claimed both since 1956 and calls them occupied cities, and two Moroccan ministers publicly renewed the claim in August 2026.
  • The 2026 Ceuta crossing. On July 30-31, 2026 about 72,000 people crossed irregularly into Ceuta, by Spain's Interior Ministry count, and at least 141 died, by the NGO Caminando Fronteras' count. A Spanish judge is investigating the role of Moroccan security forces, and Morocco denies any involvement.
  • Western Sahara. Since March 2022 Spain has called Morocco's autonomy plan the most serious basis for settling the dispute over its former colony, without recognizing Moroccan sovereignty. The Polisario Front, Algeria and Spain's own coalition partners objected, and Algeria suspended its friendship treaty with Spain until March 2026.
  • Waters off the Canary Islands. Morocco's 2020 maritime laws drew limits that overlap Spain's claims near the Canary Islands. The two countries have no maritime boundary agreement, and the issue was left off the agenda of their December 2025 summit.

How much do Morocco and Spain trade?

Download CSV

Morocco sells to Spain

$11.5bn

  • Car wiring21%
  • Women's clothing9%
  • Car parts6%
  • Cars5%

Spain sells to Morocco

$15.9bn

  • Fuels12%
  • Car parts9%
  • Engines6%
  • Copper wire6%
Goods traded between Morocco and Spain, 1995 to 2024US dollars, both directions, shares of 2024 sales

Morocco is Spain's #9 trading partner (3.3% of its goods trade). Spain is Morocco's #1 (17.7%). Spain's own customs data counted about 22.8 billion euros of trade with Morocco in 2025. The chart uses BACI's figures in US dollars, so the two do not match exactly. Source: CEPII BACI (version 202601), goods only.

Have Morocco and Spain fought a war?

1859-1860

Hispano-Moroccan War

Sides
Spain under General Leopoldo O'Donnell against the Moroccan sultanate
Result
Spain won, took Tetouan, enlarged Ceuta and imposed a 100 million peseta indemnity
Fought over
Border clashes near Ceuta and Spanish ambitions in North Africa

1921-1926

Rif War

Sides
Spain (and France from 1925) against the Republic of the Rif under Abd el-Krim
Result
Spain and France won. Abd el-Krim surrendered to France on May 27, 1926, and died in exile in Cairo in 1963
Deaths
At Annual alone, 8,000 to 10,000 Spanish dead by historian María Rosa de Madariaga's count, at least 13,000 by others

1957-1958

Ifni War

Sides
Spain, helped by France in 1958, against the Moroccan Liberation Army, an irregular force
Result
Spain kept Ifni but gave up the Cape Juby strip to Morocco
Deaths
About 180 to 300 Spanish dead, by different Spanish counts. Moroccan losses are unknown

A short history of Morocco-Spain relations

WarTreaty or peaceCrisis

Conquest and frontier · 711-1614

  1. 711Tariq ibn Ziyad crosses the straitAn army of Berbers and Arabs invaded Iberia and began al-Andalus, which lasted until 1492. Gibraltar is named for their commander: Jabal Tariq, the Mount of Tariq.
  2. 1415Portugal takes CeutaPortugal captured Ceuta on August 21, 1415. The city passed to Spain in the 17th century, and Portugal recognized Spanish rule in 1668.
  3. 1497Spain takes MelillaA fleet under Pedro de Estopiñán landed at the abandoned town on September 17, 1497. The Duke of Medina Sidonia paid for the expedition.
  4. 1609Moriscos expelled to North AfricaSpain expelled about 300,000 Moriscos between 1609 and 1614. Most went to Morocco and other parts of North Africa.

Colonial era · 1859-1956

  1. 1860Spain takes TetouanSpain won the Hispano-Moroccan War and imposed the Treaty of Wad-Ras. Spain held Tetouan until Morocco paid the indemnity, partly with money borrowed in Britain.
  2. 1912Spanish protectorate createdA Franco-Spanish convention gave Spain a protectorate over northern Morocco, with its capital at Tetouan. France held the rest.
  3. 1921Disaster of AnnualRif fighters under Abd el-Krim overran Spanish positions in July 1921, killing between 8,000 and 13,000 Spanish soldiers by different historians' counts. The Spanish commander, General Manuel Fernández Silvestre, died, and his remains were never found.
  4. 1936Moroccan troops fight for FrancoAbout 80,000 Moroccans fought in the Spanish Civil War on Franco's side. The army uprising that started the war began in Melilla on July 17, 1936.
  5. 1956Morocco's independenceSpain recognized Moroccan independence on April 7, 1956, ending its protectorate. France had recognized it five weeks earlier.

Partnership and friction · 1969-2002

  1. 1969Spain returns IfniSpain handed the town of Sidi Ifni to Morocco on June 30, 1969, under the Treaty of Fez.
  2. 1975Green March and Madrid AccordsAbout 350,000 unarmed Moroccans (Morocco's figure) marched into Spanish Sahara on November 6, 1975. Spain signed the Madrid Accords on November 14, handing administration to Morocco and Mauritania.
  3. 2002Perejil Island crisisAbout six Moroccan soldiers landed on the uninhabited islet of Perejil on July 11, and Spanish special forces removed them on July 17 without casualties. US Secretary of State Colin Powell then brokered a return to the status quo.

Crises and reconciliation · 2021-2026

  1. 2021Ceuta crossing after Ghali's treatmentAbout 8,000 to 10,000 people crossed into Ceuta on May 17-18, 2021, after Spain admitted Polisario leader Brahim Ghali to a hospital for COVID treatment. Morocco recalled its ambassador until Spain changed its Western Sahara policy in 2022.
  2. 2022Spain backs Morocco on Western SaharaPrime Minister Pedro Sánchez wrote to King Mohammed VI on March 14 calling Morocco's autonomy plan the most serious basis for resolving the Western Sahara dispute. Algeria suspended its friendship treaty with Spain in protest.
  3. 202513th summit and new customs postsSpain and Morocco held their 13th High-Level Meeting in Madrid on December 4, 2025, signing 14 agreements. Earlier that year, the first trucks crossed through commercial customs posts at Melilla, closed since 2018, and at Ceuta.
  4. 2026Mass crossing into CeutaOn July 30-31, 2026 about 72,000 people crossed into Ceuta, by Spain's count, and between 80 and 141 died, by Spanish officials' and an NGO's counts. Spain declared a national security situation in Ceuta and summoned Morocco's ambassador over ministers' claims to the city.

Treaties between Morocco and Spain

  • 1767Treaty of Peace and CommerceSpain's envoy Jorge Juan negotiated it with Sultan Mohammed ben Abdallah, who signed it on May 28, 1767. The sultan refused to enlarge Ceuta's limits, saying his predecessors had sworn not to.Superseded
  • 1860Treaty of Wad-RasEnded the 1859-1860 war. Spain enlarged Ceuta, gained a site at Ifni and imposed a 100 million peseta indemnity on Morocco.Superseded
  • 1975Madrid AccordsSpain agreed to leave Western Sahara and hand administration to Morocco and Mauritania, and it was gone by February 1976. The UN still lists Western Sahara as a non-self-governing territory.Spain left in 1976
  • 1991Treaty of Friendship, Good-Neighborliness and CooperationThe framework for modern relations, signed in Rabat on July 4, 1991. It established regular summits between governments.In force
  • 2002Perejil understandingA US-brokered deal returned the uninhabited islet to its pre-crisis status quo. Neither Morocco nor Spain occupies it.In force
  • 2022Rabat Joint DeclarationA roadmap signed on April 7, 2022 after Sánchez's letter backing Morocco's Western Sahara autonomy plan. It reopened Ceuta and Melilla's borders, resumed ferries and set up working groups.In force

How often do Morocco and Spain vote the same way at the UN?

In 2025, Morocco and Spain voted the same way on 82% of the recorded votes in the UN General Assembly. Morocco and Spain voted the same way on 82% of UN General Assembly votes in 2025, up from 66% in 2024. That was their highest rate in any year since 1995. Compare their votes →

Abstaining while the other votes yes or no counts as half agreement. Data: UN Digital Library voting data, 1991 to 2025.

How well do you know Morocco and Spain?

10 questions on their wars, treaties, trade and size. About three minutes, no signup.

Morocco vs Spain: how they compare

All rankings →

Questions about Morocco and Spain

What Spanish territory is in Morocco?

Spain holds two cities on Morocco's coast: Ceuta (about 84,000 people) and Melilla (about 87,000). It also holds three small outposts: the Peñón de Vélez de la Gomera, the Peñón de Alhucemas and the Chafarinas Islands. Morocco claims all of them. The islet of Perejil is claimed by both countries and left empty under a 2002 deal brokered by the United States.

How far apart are Spain and Morocco?

About 14 km at the narrowest point of the Strait of Gibraltar, between Punta de Oliveros in Spain and Punta Cires in Morocco. The strait is 58 km long. Ceuta and Melilla share land borders with Morocco. The two countries have studied a rail tunnel under the strait since 1979, with completion now put at 2035 to 2040.

What happened in Ceuta in July 2026?

On July 30-31, 2026 about 72,000 people, most of them young Moroccans, crossed irregularly into Ceuta, by Spain's Interior Ministry count. Spanish authorities counted more than 80 dead, and the NGO Caminando Fronteras counted 141 on both sides of the border. A Spanish judge is investigating the role of Moroccan security forces. Morocco denies any involvement, and Spain's intelligence service found no evidence that Moroccan authorities planned the crossings.

Does Morocco claim Ceuta and Melilla?

Yes. Morocco has claimed both cities since its independence in 1956 and calls them occupied. Spain says they were Spanish before the modern Moroccan state existed and that their people are Spanish citizens. Morocco's palace and foreign ministry rarely press the claim formally, but in August 2026 two Moroccan ministers publicly renewed it, and Spain summoned Morocco's ambassador.

Did Spain colonize Morocco?

Spain ruled a protectorate over northern Morocco from 1912 to 1956, with its capital at Tetouan, while France held the rest. Spain also held Ifni until 1969 and left Western Sahara in 1976. The Rif War of 1921-1926 was the deadliest fighting of that period. Historians have documented Spanish use of chemical weapons against fighters and civilians in the Rif, which Spain has never formally acknowledged.

Are Morocco and Spain co-hosting the 2030 World Cup?

Yes. FIFA confirmed Morocco, Spain and Portugal as 2030 World Cup hosts on December 11, 2024, with 11 stadiums in Spain, six in Morocco and three in Portugal. FIFA has not chosen the venue for the final: Spain backs Madrid's Santiago Bernabéu, and Morocco backs the Grand Stade Hassan II near Casablanca. Before Spain's November 29, 2026 election, opposition leader Alberto Núñez Feijóo said Spain should quit co-hosting if Morocco gets the final.

7 days free cancel anytime
Get the app