History · Morocco

Morocco: The Western Kingdom

The one North African land the Ottomans never took — home of Berber empires that ruled Muslim Spain, a sharifian monarchy since the 1660s, a French protectorate for 44 years, and the disputed Western Sahara

By Worldlore Editorial · 19 September 2026

A tall sandstone minaret with blind arches and a green-tiled band, rising above palm trees
The Koutoubia Mosque in Marrakesh, built by the Almohads in the 12th century. Its minaret was the model for the Giralda of Seville and the Hassan Tower of Rabat. (Jakub Hałun / Wikimedia Commons · CC BY 4.0)

The far west of the Muslim world

Morocco — al-Maghrib al-Aqsa, "the far west" — occupies the north-western corner of Africa, facing Spain across the Strait of Gibraltar. It is the one country in North Africa the Ottoman Empire never ruled, and one of the few in Africa that escaped formal colonisation until the 20th century, and then only for 44 years. It has been governed by the same dynasty, the Alaouites, since the 1660s. Its population of 37 million is Arab and Amazigh (Berber), and its king holds the religious title Commander of the Faithful.

A short history

  1. 42 CE

    Roman Mauretania

    The north becomes a Roman province; Volubilis its inland city.

  2. c. 789

    The Idrisids

    Idris I founds the first Moroccan Muslim state and Fez.

  3. c. 1040–1147

    Almoravids

    A Saharan Berber empire; Marrakesh is founded.

  4. c. 1121–1269

    Almohads

    Berber rule from Libya to southern Spain — the region's largest state.

  5. 1578

    Alcácer Quibir

    The Saadians crush a Portuguese invasion.

  6. from c. 1666

    The Alaouites

    The current sharifian dynasty takes power.

  7. 1912

    The Protectorate

    France and Spain divide Morocco; the sultan is kept as a figurehead.

  8. 1921–1926

    The Rif War

    Abd el-Krim defeats Spain before a joint offensive crushes the revolt.

  9. 1956

    Independence

    Morocco regains sovereignty under Mohammed V.

  10. 1975

    The Green March

    Morocco claims the Western Sahara as Spain withdraws.

Berbers, Rome, and Islam

The Amazigh peoples are indigenous to North Africa, and Morocco holds the oldest known fossils of our species, from Jebel Irhoud. Rome ruled only the north, from Volubilis and the coast, and withdrew by the 5th century.

Standing columns, a triumphal arch and paved streets of the Roman city of Volubilis among green hills
Volubilis, the main Roman city of inland Morocco. Arab armies reached the far west in the late 7th century, and after fierce Berber resistance the region converted to Islam. (Mustang Joe / Wikimedia Commons)

Idris I, a descendant of the Prophet fleeing the Abbasids, founded Morocco's first Muslim dynasty around 789 and the city of Fez, whose Qarawiyyin, established in 859, is often called the oldest continuously operating university in the world.

The Berber empires

For two centuries Morocco was the seat of empires that ruled the Maghreb and Muslim Spain. The Almoravids, a Saharan Berber religious-military movement, founded Marrakesh and united Morocco with al-Andalus. The Almohads overthrew them and ruled from Libya to southern Spain — the largest state the region has ever known, and a high point of philosophy, producing Averroes and, in its Jewish community, Maimonides. Their defeat in Spain in 1212 doomed Muslim Iberia. The Marinids that followed made Fez a cultural peak, building its great madrasas.

The imperial cities

A dense honeycomb of round stone dyeing vats filled with coloured liquid in the Fez tannery
The tanneries of Fez el-Bali, in use since medieval times. Fez was Morocco's centre of learning and craft under the Idrisids and the Marinids. (Hiroki Ogawa / Wikimedia Commons)
A large unfinished square stone minaret surrounded by rows of stone column stumps in Rabat
The Hassan Tower in Rabat — the minaret of a giant mosque begun by the Almohads in 1195 and never finished. The mausoleum of Mohammed V now stands beside it. (Bernard Gagnon / Wikimedia Commons)

The sharifian dynasties

From the 16th century, Morocco was ruled by dynasties claiming descent from the Prophet. The Saadians rose resisting Portuguese coastal footholds, crushed a Portuguese invasion at Alcácer Quibir in 1578, and sent an army across the Sahara to conquer the Songhai Empire for its gold in 1591. The Alaouites, who took over around 1666 and still rule, produced Moulay Ismail — a long-reigning, formidable sultan who unified the country, built a slave army and an imperial capital at Meknes, and drove the English from Tangier. After him came weaker sultans, wide tribal autonomy, and slow European encroachment.

Protectorate and resistance

Nineteenth-century defeats, debt and forced trade concessions left Morocco exposed, and the European powers agreed to French dominance. The Treaty of Fez in 1912 imposed a French protectorate over most of the country, a Spanish zone in the north and south, and an international zone at Tangier, keeping the sultan as a figurehead.

Resistance and rule

A 1925 portrait of the Rif leader Abd el-Krim in a turban
Abd el-Krim, who routed the Spanish army at Annual in 1921 and declared a Republic of the Rif. It took a joint Franco-Spanish force of some 250,000, using chemical weapons on Rif villages, to defeat him by 1926. (TIME / Wikimedia Commons)
King Hassan II of Morocco in a suit, photographed in 1983
Hassan II, king from 1961 to 1999. He survived two coup attempts and presided over the 'Years of Lead' — decades of disappearances, secret prisons and censorship. (Christian Lambiotte / Wikimedia Commons)

French rule (1912–56) built railways, ports and a modern Casablanca, brought half a million European settlers, and only completed the military conquest of the interior in 1934. When France deposed and exiled Sultan Mohammed V in 1953, the move backfired, uniting the country behind him; France brought him back and granted independence on 2 March 1956, with Spain relinquishing its zones the same year — though Spain kept the enclaves of Ceuta and Melilla, which it still holds.

The kings, and the Sahara

Mohammed V is revered as the father of independence. His son Hassan II ruled for 38 years as a shrewd autocrat. In November 1975, as Spain withdrew from the phosphate-rich Western Sahara, he sent some 350,000 unarmed Moroccans marching into the territory — the Green March — to assert Morocco's claim.

A vast column of Moroccan marchers carrying flags and Qurans crossing the desert in 1975
The Green March, November 1975. The Polisario Front then fought a 16-year war for an independent Sahrawi state; a 1991 UN ceasefire promised a referendum that has never been held. (United Press International / Wikimedia Commons)

Morocco controls about 80 per cent of the territory, behind a 2,700-kilometre sand wall, and offers only autonomy under its sovereignty — a position now backed by the United States, France and Spain, though the African Union recognises the Sahrawi republic.

Mohammed VI, king since 1999, has overseen an acknowledgement of some past abuses, a reform of family law improving women's rights, and major infrastructure — while retaining ultimate power. The 2011 Arab Spring brought large protests, which the king headed off with a new constitution that recognised Amazigh and modestly strengthened parliament. A devastating earthquake struck the High Atlas in 2023.

What Morocco carries

Morocco's self-image rests on two pillars: an imperial past, when Berber and then sharifian dynasties ruled from the Atlantic to the Nile and across the strait into Spain; and a continuity almost unique in the region — never Ottoman, briefly colonised, and governed by one dynasty for over 350 years. The protectorate is a 44-year interruption in that story. The Western Sahara is the piece the monarchy insists is part of it.

Explore the destination