Morocco: a history from Volubilis to the modern kingdom

Fez's al-Qarawiyyin is often called the oldest university in the world, and Morocco's Ibn Battuta crossed the Indus and visited Multan in the 14th century. A kingdom for twelve centuries, Morocco is a close friend of Pakistan.

By Last reviewed

Morocco
Morocco and its neighbours. Borders approximate.

Key facts

Capital
Rabat
Independence
2 March 1956, from France
King
Mohammed VI, since July 1999
Population
About 37 million
Languages
Arabic and Tamazight (Berber), with French widely used
Link with Pakistan
Ibn Battuta of Tangier travelled through Sindh and Multan; friendly ties within the OIC

Through the ages

The main periods of Morocco's history, 300 BCE to today. Recent centuries are drawn wider so they can be read.

  1. Berber kingdoms and Mauretania300 BCE to 40 CE
  2. Roman Mauretania40 CE to 700 CE
  3. Idrisids788 CE to 974 CE
  4. Almoravids and Almohads1040 to 1269
  5. Marinids, Wattasids and Saadians1244 to 1659
  6. Alaouite dynasty1666 to 1912
  7. French and Spanish protectorates1912 to 1956
  8. Independent Morocco1956 to today

Timeline

  1. 40 CE
    Empires and dynasties

    Roman Volubilis

    Rome annexes the Berber kingdom of Mauretania. Volubilis becomes a prosperous Roman town.

  2. 788 CE
    Empires and dynasties

    The Idrisids

    Idris I, a descendant of the Prophet, founds the first Moroccan Muslim dynasty. His son founds Fez.

  3. 859 CE
    Culture and faith

    Al-Qarawiyyin

    Fatima al-Fihri founds the al-Qarawiyyin mosque in Fez, which grows into one of the oldest universities in the world.

  4. c. 1070
    Empires and dynasties

    The Almoravids

    The Almoravids found Marrakesh and build an empire from Senegal to Spain.

  5. 1147
    Empires and dynasties

    The Almohads

    The Almohads take Marrakesh. Their empire covers North Africa and Muslim Spain, and they build the Koutoubia mosque.

  6. 24 February 1304
    Culture and faith

    Ibn Battuta

    Ibn Battuta is born in Tangier. On his travels he crosses the Indus in 1333 and visits Multan before reaching Delhi.

  7. 1492
    Politics

    Refugees from Spain

    After the fall of Granada, Muslims and Jews expelled from Spain settle in Moroccan cities.

  8. 1578
    Wars and conflict

    The Battle of the Three Kings

    The Saadians defeat a Portuguese invasion at Ksar el-Kebir.

  9. c. 1666
    Empires and dynasties

    The Alaouites

    The Alaouite dynasty takes power. It still rules Morocco.

  10. 1912
    Empires and dynasties

    The protectorate

    The Treaty of Fez makes most of Morocco a French protectorate, with Spain holding the north and south.

  11. 1921
    Wars and conflict

    The Rif war

    Abd el-Krim leads a Rif republic that defeats Spain at Annual before French and Spanish forces crush it in 1926.

  12. 2 March 1956
    Independence

    Independence

    Morocco regains independence under Sultan Mohammed V, who becomes king.

  13. November 1975
    Politics

    The Green March

    About 350,000 Moroccans march into Western Sahara as Spain withdraws. The Polisario Front, seeking independence, fights Morocco until a UN ceasefire in 1991.

  14. July 1999
    Politics

    Mohammed VI

    King Hassan II dies and his son Mohammed VI becomes king.

  15. June 2017
    Culture and faith

    Jebel Irhoud

    Scientists announce that fossils from Jebel Irhoud, about 300,000 years old, are among the oldest known remains of modern humans.

  16. 8 September 2023
    Disasters

    The Al Haouz earthquake

    An earthquake in the High Atlas kills nearly 3,000 people.

Berbers and Romans

Morocco lies at the north-west corner of Africa, facing Spain across the Strait of Gibraltar. At Jebel Irhoud, archaeologists found some of the oldest known remains of modern humans, about 300,000 years old. The Berber, or Amazigh, peoples have lived here since prehistory. Phoenicians and Carthaginians traded on the coast, and Berber kings ruled Mauretania until Rome annexed it in 40 CE. Volubilis, near Meknes, became a prosperous Roman town.

The Muslim dynasties

Islam reached Morocco in the late seventh century, and in 711 an army of Berbers led by Tariq ibn Ziyad crossed into Spain. In 788 Idris I, a descendant of the Prophet, founded the first Moroccan Muslim dynasty, and his son founded Fez. In 859 Fatima al-Fihri founded the al-Qarawiyyin mosque there, which grew into one of the oldest universities in the world. In the eleventh and twelfth centuries two great Berber empires, the Almoravids and the Almohads, ruled from Marrakesh over North Africa and Muslim Spain, building monuments such as the Koutoubia mosque. The Marinids filled Fez with madrasas. When Granada fell in 1492, Muslims and Jews expelled from Spain found refuge in Morocco.

Ibn Battuta

In 1304 Ibn Battuta was born in Tangier. He set out for Hajj at 21 and kept travelling for about thirty years, reaching West Africa, East Africa, Central Asia, India and China. In 1333 he crossed the Indus and travelled through Sindh and Multan, describing the cities and customs of what is now Pakistan, before serving as a judge in Delhi. His book, the Rihla, is one of the great travel accounts of the medieval world.

Sultans and the protectorate

The Saadian dynasty defeated a Portuguese invasion in 1578, and the Alaouite dynasty, which still rules, took power in the 1660s. Morocco kept its independence longer than its neighbours, but in 1912 it became a French protectorate, with Spain holding the north and south. In the Rif, Abd el-Krim led a revolt that defeated Spain in 1921 before being crushed in 1926. Under Sultan Mohammed V, Morocco regained independence on 2 March 1956.

Modern Morocco

Hassan II ruled from 1961 to 1999. In 1975, as Spain left Western Sahara, he led the Green March of about 350,000 Moroccans into the territory. The Polisario Front, backed by Algeria, fought for independence until a UN ceasefire in 1991, and the dispute is still unresolved; Morocco offers the territory autonomy under its sovereignty. Mohammed VI, king since 1999, has introduced reforms and a new constitution in 2011. Morocco and Pakistan have long been friends and work together in the OIC.

For our latest reporting on Morocco, see the news listed on this page.

Landmarks and heritage

From the 9th century

Medina of Fez

Fez

The old city with al-Qarawiyyin and its madrasas. A UNESCO World Heritage Site.

From the 11th century

Medina of Marrakesh

Marrakesh

The Koutoubia mosque and Jemaa el-Fnaa square. A UNESCO World Heritage Site.

Roman era

Volubilis

Near Meknes

A Roman town with fine mosaics. A UNESCO World Heritage Site.

1993

Hassan II Mosque

Casablanca

A mosque on the Atlantic shore with one of the tallest minarets in the world.

Terms you will meet in the news

Maghreb
Arabic for the west, the name for north-west Africa.
Makhzen
The traditional Moroccan royal government and its network of power.
Rihla
Ibn Battuta's travel book, describing a journey of about 30 years.
Western Sahara
A disputed territory, mostly controlled by Morocco, which the Polisario Front claims for an independent state.

Quick answers

Did Ibn Battuta visit Pakistan?

Yes. The Moroccan traveller crossed the Indus in 1333 and passed through Sindh and Multan on his way to Delhi, describing them in his Rihla.

What is the oldest university in the world?

Al-Qarawiyyin in Fez, founded as a mosque by Fatima al-Fihri in 859, is often called the oldest existing university.

What is the Western Sahara dispute?

Morocco regards Western Sahara as its southern provinces and offers it autonomy. The Polisario Front, backed by Algeria, seeks independence. The UN has worked for a settlement since 1991.

Sources and further reading

Compiled by The Indus Compass from the sources above and standard reference works, and reviewed 29 November 2026. Dates before the modern era are approximate and some are debated by historians. Spotted a mistake? Tell the newsroom and we will correct it.