Was Morocco Colonized by Spain? The Spanish Protectorate Explained

Cross the Strait of Gibraltar by ferry and, an hour later, you can be sitting in a cafe in Tetouan, where the waiter greets you with “¡hola!”, the bakery sells churros and the white buildings of the old Spanish quarter look as if they belong in Andalusia. Drive a little further and you reach Chefchaouen, Larache or Asilah, where Spanish is still heard in the streets. It is natural to ask: was Morocco colonized by Spain?

The answer is yes, but only in part. Between 1912 and 1956, Spain ruled a protectorate over northern Morocco and a separate zone in the south, while France controlled most of the country. Spain also kept several coastal enclaves and, until 1975, a Saharan territory further south. In this guide we explain where Spain ruled, how it began and ended, what happened in the famous Rif War, and how the Spanish legacy still shapes the places you visit today.

Yes, Spain colonized part of Morocco. From 1912 to 1956, northern Morocco, including the Rif mountains and cities such as Tetouan, Chefchaouen, Larache and Al Hoceima, was a Spanish protectorate, with Tetouan as its capital. Spain also controlled the Tarfaya strip in the south, the enclave of Sidi Ifni and, further south, the territory then known as Spanish Sahara.

However, most of Morocco, including Fes, Marrakech, Rabat and Casablanca, was under French rule, and Tangier became an international zone. The northern Spanish zone returned to Morocco on April 7, 1956. Other areas followed in 1958, 1969 and 1975, while the cities of Ceuta and Melilla remain under Spanish administration today and are claimed by Morocco.

TerritoryUnder Spanish controlToday
Northern protectorate (Rif, Tetouan, Chefchaouen, Larache, Al Hoceima)1912 to 1956Part of Morocco since April 7, 1956
Tarfaya strip (Cape Juby)1912 to 1958Part of Morocco since 1958
Sidi Ifni1934 to 1969Part of Morocco since 1969
Spanish SaharaUntil 1975 to 1976Disputed; administered largely by Morocco, with a UN-led process ongoing
Ceuta and MelillaSince the 15th to 17th centuriesSpanish cities, claimed by Morocco
Small islands and rocks off the Mediterranean coastSince the 16th to 19th centuriesSpanish, claimed by Morocco

Morocco was divided between two protecting powers, and the differences still shape the country today.

Spanish zoneFrench zone
AreaAbout 20,000 km² in the north, plus southern zonesMost of the country
CapitalTetouanRabat
Main citiesTetouan, Larache, Chefchaouen, Al Hoceima, NadorCasablanca, Rabat, Fes, Marrakech, Meknes
Representative of the SultanThe Khalifa in TetouanThe Sultan himself in Rabat
Main resistanceRif War (1921 to 1926)Zaian War and resistance in the Atlas
End of protectorateApril 7, 1956March 2, 1956
Language legacySpanish, mainly in the northFrench, across the country

If you want the full story of the French side, read our guide on whether France colonized Morocco.

Like France, Spain ruled its Moroccan zone as a protectorate, not as a formal colony. On paper, the Moroccan state continued to exist. In the Spanish zone, the Sultan was represented by a Khalifa, a member of the royal family who lived in Tetouan and held religious and legislative authority by delegation. In practice, a Spanish High Commissioner held real power over the administration, the army and the economy.

So while Spain never annexed northern Morocco, historians generally agree that the protectorate was a form of colonial rule. Moroccans did not govern themselves, and the Spanish army fought long campaigns to impose control, especially in the Rif.

The relationship between Spain and Morocco is centuries old. Moroccan dynasties such as the Almoravids and Almohads once ruled much of the Iberian Peninsula, and Andalusian refugees, both Muslim and Jewish, settled in Moroccan cities such as Tetouan, Chefchaouen, Fes and Rabat after the Christian reconquest. Their influence can still be seen in the architecture, music and food of northern Morocco. Read more in our guide to the Moroccan Empire.

From the late fifteenth century, Spain and Portugal took control of a number of coastal towns. Melilla came under Spanish rule in 1497, and Ceuta, captured by Portugal in 1415, passed to Spain in the seventeenth century. In 1859 and 1860, Spain fought a war against Morocco, occupied Tetouan for two years and imposed a heavy indemnity, which weakened the Moroccan state and increased European influence.

By the early twentieth century, European powers were competing for influence in Morocco. France obtained the largest share, but Britain wanted to keep the coast facing Gibraltar out of French hands, so Spain was given a zone in the north. After the Treaty of Fes created the French protectorate in March 1912, France and Spain signed a separate treaty on November 27, 1912, which turned the Spanish sphere of influence into a formal protectorate.

The northern zone was relatively small, about 20,000 square kilometers, but it was mountainous and hard to control. It stretched from the Atlantic coast around Larache and Asilah to the Mediterranean coast near the Algerian border, and included the Rif and the Jebala mountains. Tetouan became its capital, and the first Khalifa took office there in 1913.

The Spanish protectorate is remembered above all for the Rif War (1921 to 1926), one of the most important anti-colonial wars of the twentieth century. In the mountains of the Rif, the Amazigh tribes were fiercely independent and had never accepted foreign rule. They found a remarkable leader in Mohammed ibn Abd el-Karim al-Khattabi, known as Abd el-Krim, a former judge and journalist from the Beni Ouriaghel tribe near Al Hoceima.

In the summer of 1921, Abd el-Krim’s forces inflicted a stunning defeat on the Spanish army at the Battle of Annual. More than 13,000 Spanish soldiers were killed, and Spain lost most of the territory it had occupied in the eastern Rif. The disaster caused a political crisis in Madrid. Abd el-Krim then created the Republic of the Rif, with its own government, army and administration, which inspired independence movements far beyond Morocco.

In 1925, Abd el-Krim advanced into the French zone, and France and Spain joined forces. A combined Spanish and French landing at Al Hoceima (Alhucemas) in September 1925, followed by a massive military campaign, defeated the Rif republic. Abd el-Krim surrendered in May 1926 and was exiled. The war was brutal, and it is also remembered for the use of chemical weapons against Rif populations, a painful subject that is still discussed in the region today.

Compared with the French zone, the Spanish protectorate received less investment. It was poorer, more rural and more mountainous, and Spain itself was going through difficult economic and political times. Still, Spain built roads, a railway between Tetouan and Ceuta, ports, schools and new European-style districts beside the old medinas.

  • Tetouan became an elegant colonial capital, with a white Ensanche district of wide streets, balconies and Art Deco and neo-Moorish buildings next to its UNESCO-listed medina.
  • Larache, Asilah and Al Hoceima grew as coastal towns with Spanish neighborhoods, churches and markets.
  • Chefchaouen, a once-closed mountain town, was occupied by Spanish troops in 1920 and later became one of Morocco’s most visited destinations.
  • Spanish became the language of administration and education in the zone, alongside Arabic and Tarifit.

As in the French zone, Moroccans did not hold real political power, and many rural communities lost land or resources. For a closer look at the former capital, see our guide to things to do in Tetouan.

Spanish Morocco played a decisive role in Spain’s own history. In July 1936, the military uprising against the Spanish Republic began in the protectorate, and General Francisco Franco took command of the Army of Africa. Tens of thousands of Moroccan soldiers, many recruited from the Rif and the poorest rural areas, served in the Regulares and fought in the Spanish Civil War. This chapter is part of the shared and often painful history between the two countries.

After France agreed to end its protectorate in March 1956, Spain followed. On April 7, 1956, Spain recognized Morocco’s independence and returned the northern zone. Tangier rejoined Morocco in October 1956. Other territories took longer:

DateEvent
November 27, 1912Franco-Spanish treaty creates the Spanish protectorate
1913First Khalifa takes office in Tetouan
1921Battle of Annual
1921 to 1926Rif War and the Republic of the Rif
September 1925Al Hoceima landing
July 1936Military uprising begins in Spanish Morocco
April 7, 1956End of the Spanish protectorate in the north
1957 to 1958Ifni War
1958Tarfaya returns to Morocco
1969Sidi Ifni returns to Morocco
November 1975Green March and Madrid Accords
1976Spain withdraws from Spanish Sahara

Tarfaya and Sidi Ifni

In 1957 and 1958, fighting broke out around the Spanish enclave of Sidi Ifni and in the Saharan south, in what became known as the Ifni War. In 1958, Spain handed the Tarfaya strip to Morocco. Sidi Ifni, a small Atlantic town with charming Art Deco buildings, remained Spanish until a treaty signed in January 1969 returned it to Morocco later that year.

Spanish Sahara

Further south, Spain controlled a large desert territory known as Spanish Sahara. In November 1975, Morocco organized the Green March, in which some 350,000 unarmed Moroccans crossed into the territory. Days later, Spain signed the Madrid Accords and withdrew in early 1976. The status of the territory, which Morocco calls its Southern Provinces and others call Western Sahara, has since been the subject of a long political dispute involving Morocco and the Polisario Front, with a UN-led process still under way. In October 2025, the UN Security Council called for negotiations using Morocco’s autonomy proposal as a basis. Today, travelers visit the region’s main cities, such as Dakhla, for kitesurfing, desert landscapes and the Atlantic coast.

Two cities on the Moroccan coast are still Spanish today: Ceuta, facing Gibraltar, and Melilla, further east. Both have been under Iberian rule for centuries, long before the protectorate, and are autonomous cities of Spain and part of the European Union. Spain also holds a few small islands and rocks near the coast. Morocco considers these territories occupied and claims them, while Spain considers them an integral part of its national territory.

For travelers, Ceuta and Melilla are border crossings into Morocco from Spanish territory. Crossings can be busy and rules change, so always check the latest information before planning to enter Morocco this way. Most visitors coming from Spain prefer the ferries to Tangier Med or Tangier Ville; see our guide to traveling from Spain to Morocco.

Language

In the north, especially in Tetouan, Chefchaouen, Larache, Al Hoceima and Nador, many people speak Spanish, and Spanish television has long been popular. Elsewhere in Morocco, French is far more common. Our guide to the languages of Morocco explains the mix of Darija, Amazigh languages, French and Spanish.

Architecture and towns

The white Ensanche of Tetouan, the colonial buildings of Larache, the churches and old theaters, and the Art Deco facades of Sidi Ifni are all part of this heritage. Many towns combine an Andalusian-style medina with a Spanish-era district, making the north feel different from the rest of the country.

Food and daily life

Churros for breakfast, Spanish-style bakeries, seafood dishes, and football loyalties split between Real Madrid and Barcelona are part of everyday life in the north. Close family and economic ties also link northern Morocco with Spain, home to a large Moroccan community.

It is easy to assume that everything Spanish in northern Morocco comes from the protectorate, but much of it is far older. After the fall of Granada in 1492 and the expulsions that followed, thousands of Muslims and Jews from Al-Andalus crossed the strait and settled in Morocco. They rebuilt Tetouan, which had been destroyed in the fifteenth century, and helped shape Chefchaouen, founded in 1471. Their descendants brought Andalusian music, architecture, cooking and family names that are still part of northern Moroccan identity today.

When you walk through the white medina of Tetouan or listen to Andalusian classical music in Chefchaouen, you are seeing this older heritage, not the colonial one. The Spanish Ensanche built in the twentieth century sits next to it, which is why Tetouan is often described as a meeting point of two very different Spanish influences. Discover more about why Chefchaouen is blue.

In northern Morocco, memories of the protectorate are mixed. The Rif War and Abd el-Krim are a source of great pride, and the hardships of the period, including poverty and the use of chemical weapons in the Rif, are not forgotten. At the same time, many families in the north have close personal and economic ties with Spain, and older generations sometimes recall the Spanish towns, schools and cinemas with a certain nostalgia.

Today, Morocco and Spain are close partners, linked by trade, tourism, migration and a shared Mediterranean culture, even if questions such as Ceuta, Melilla and the Sahara remain sensitive. As a visitor, you will find people in the north happy to talk about this history, especially if you ask with curiosity and respect.

  • Tetouan: the white Ensanche, Plaza Moulay el Mehdi, the old Spanish theaters and the UNESCO-listed medina next door.
  • Chefchaouen: the blue medina and its kasbah, with traces of the Spanish period. See our guide to the Blue City.
  • Larache: the Spanish-era plaza, the old cemetery and the ruins of ancient Lixus just outside town.
  • Asilah: whitewashed walls, murals and a relaxed seaside atmosphere.
  • Al Hoceima: the Mediterranean coast and the heart of the Rif, where the 1925 landing took place.
  • Sidi Ifni: a quiet Atlantic town with remarkable Spanish Art Deco buildings.
  • Tangier: the cosmopolitan legacy of the international zone, with Spanish, French and British influences. See is Tangier worth visiting.
  • A few words of Spanish are very useful in Tetouan, Chefchaouen and the Rif, often more than French.
  • Learning some Darija greetings is always appreciated; see our guide to saying hello in Moroccan Arabic.
  • The ferries from Tarifa and Algeciras to Tangier are the easiest way to arrive from Spain; read our guide from Barcelona to Tangier.
  • The north is greener and cooler than the south, so pack a light jacket outside summer.
  • Tetouan and Chefchaouen combine easily into a two- or three-day trip from Tangier or Fes.

If you want to see this history for yourself, here is a simple four-day route from Tangier:

  • Day 1, Tangier: explore the kasbah, the old medina and the legacy of the international zone.
  • Day 2, Asilah and Larache: drive down the Atlantic coast, visit the whitewashed walls of Asilah, the Spanish plaza of Larache and the Roman and Phoenician ruins of Lixus.
  • Day 3, Tetouan: the former capital of the Spanish protectorate, with its Ensanche and its Andalusian medina.
  • Day 4, Chefchaouen: the blue town in the Rif mountains, then continue to Fes or return to Tangier.

This route works well before or after a trip to Fes and the Sahara, and our local team can adapt it to your dates.

  • “Morocco was a Spanish colony.” Only the north and some southern zones were Spanish; most of Morocco was French.
  • “Spain left Morocco completely in 1956.” The northern zone returned in 1956, but Tarfaya, Ifni and the Sahara followed later, and Ceuta and Melilla remain Spanish.
  • “Moroccans in the north are Spanish.” The north has strong Spanish influences, but its identity is deeply Moroccan, Amazigh and Andalusian.
  • “The Rif War was a minor revolt.” It was one of the largest colonial wars of its time and required a joint Spanish and French campaign to end.

When we take travelers from Tangier to Tetouan and Chefchaouen, many are surprised by how different the north feels from Marrakech or the desert. The white streets, the Spanish words, the churros and the Andalusian music tell a story of centuries of exchange across the Strait, not only of the protectorate years. Understanding that history makes a trip to the north far richer, and it often leads to the best conversations with local people.

Was Morocco colonized by Spain?

Partly. Spain ruled a protectorate over northern Morocco and zones in the south from 1912 to 1956, while most of the country was a French protectorate.

Which parts of Morocco did Spain control?

The north, including the Rif, Tetouan, Chefchaouen, Larache and Al Hoceima, the Tarfaya strip, Sidi Ifni and the territory then called Spanish Sahara.

When did Spain leave Morocco?

Spain ended its northern protectorate on April 7, 1956. Tarfaya returned in 1958, Sidi Ifni in 1969, and Spain withdrew from the Sahara in 1975 and 1976.

What was the capital of Spanish Morocco?

Tetouan was the capital of the Spanish protectorate.

Who was Abd el-Krim?

The leader of the Rif resistance who defeated the Spanish army at Annual in 1921 and founded the short-lived Republic of the Rif.

Are Ceuta and Melilla part of Morocco?

They are Spanish autonomous cities on the North African coast. Morocco claims them, while Spain considers them part of its territory.

Do people in Morocco speak Spanish?

Yes, especially in the north, in cities such as Tetouan, Chefchaouen, Larache, Al Hoceima and Nador.

Was Morocco colonized by France or Spain?

Both. France ruled most of Morocco, Spain ruled the north and some southern zones, and Tangier was an international zone.

So, was Morocco colonized by Spain? Yes, in part. For 44 years Spain ruled northern Morocco and several southern zones, fought one of the great colonial wars of the twentieth century in the Rif and left a lasting mark on the language, towns and daily life of the north. Yet Morocco’s identity remained its own, and the Spanish chapter is just one layer in a long history of exchange across the Strait of Gibraltar.

Want to explore northern Morocco’s Spanish and Andalusian heritage? Contact us, and we will design a private tour through Tangier, Tetouan, Chefchaouen and beyond.

Tours from Marrakech: Cross the High Atlas to Ait Ben Haddou and the dunes of Erg Chebbi.

Morocco Desert Tours: Camel trekking and a night under the stars in a Sahara desert camp.

Tours from Fes: The oldest medina in Morocco, then the Middle Atlas and the desert.

Tours from Casablanca: Begin at the Hassan II Mosque and travel through the imperial cities.

Tours from Tangier: Start in the north with Chefchaouen and the Rif Mountains.

Tours from Ouarzazate: Kasbahs, film studios and the gorges of the south.

Name
Lahcen Saadi, a professional local guide from the Exploring Morocco Trips team, in traditional attire in front of a 4x4 in the Sahara dunes

Your Local Experts

Our Moroccan team organizes private tours from every major city in Morocco: Marrakech, Fes, Casablanca, Tangier, Rabat, Agadir, Ouarzazate and more. Wherever you land, we pick you up and design your trip around your dates and interests.

Scroll to Top