Saturday, 21 November 2026 · The Stories, Places and People of Africa
African Travel Chronicles
HISTORY & HERITAGE

Morocco’s history: Amazigh kingdoms, Islamic dynasties, the protectorate and independence

Morocco is one of the few African countries never fully ruled by the Ottomans. Its history is one of strong dynasties, trade and a long Amazigh heritage.

By ATC Editorial Morocco

Morocco’s history is often told through its dynasties, each of which founded or rebuilt a capital. The country’s earliest known peoples are the ancestors of today’s Amazigh, also called Berber, communities, whose languages remain widely spoken, and Tamazight became an official language in the 2011 constitution. Some of the world’s oldest known Homo sapiens fossils come from Jebel Irhoud, which we describe in our article on where humanity began. This article follows the later story. For a visitor’s view of the same places, see our Morocco traveller guide.

Amazigh kingdoms and Rome

In antiquity the north of the country formed part of the kingdom of Mauretania, and Rome later organised a province called Mauretania Tingitana, with Volubilis, near Meknes, as its best-known city. The ruins, inscribed by UNESCO in 1997, include mosaics, a triumphal arch and the remains of olive-oil presses, and show how deeply Roman and local cultures mixed. Roman control was thin in the mountains and south, where Amazigh communities kept their own leadership.

The arrival of Islam and the Idrisids

Arab armies reached North Africa in the seventh century, and many Amazigh communities adopted Islam over the following generations, while keeping their own languages and customs. In 788 Idris I, a descendant of the Prophet who had fled from the east, was accepted as leader in the Volubilis area. His son Idris II made Fez his capital from about 808, and the Idrisid state is usually regarded as the first Moroccan dynasty. Fez became a centre of scholarship, and the Al-Qarawiyyin mosque and school, founded in the ninth century, is often described as one of the oldest continuously operating educational institutions in the world, a claim that depends on how a university is defined.

The Almoravids and Almohads

From the eleventh century two movements that began among Amazigh communities built empires stretching from the Sahara to Spain. The Almoravids, from the Saharan edge, founded Marrakech around 1070 and took control of much of Islamic Spain. The Almohads, who came from the Atlas mountains, overthrew them in the twelfth century and left some of Morocco’s best-known buildings, including the Koutoubia minaret in Marrakech and the Hassan Tower in Rabat, which was left unfinished. During these centuries Morocco was part of an exchange of scholars, architects and merchants that linked Cordoba, Seville, Marrakech and Fez.

The Marinids, Saadians and Alaouites

The Marinids ruled from Fez from the thirteenth to the fifteenth century and built many of its madrasas. In the sixteenth century the Saadian dynasty rose in the south and defeated a Portuguese army at the Battle of the Three Kings in 1578, which ended Portuguese ambitions in the interior. Its tombs in Marrakech are a visitor attraction. After the Saadians, the Alaouite dynasty took power in the seventeenth century, and its ruling family is still in place. Meknes was made a capital under Sultan Moulay Ismail, whose long reign was marked by large building projects and a strong army.

Morocco was never incorporated into the Ottoman Empire, a point of national pride that explains why its political and cultural history differs from that of Algeria, Tunisia and Libya. European powers nevertheless increased their pressure from the nineteenth century, through trade agreements, loans and military defeats.

The protectorates and independence

In 1912 the Treaty of Fez made most of Morocco a French protectorate, and Spain took control of zones in the north and south. The sultan remained in place, but real authority lay with French officials. Resistance included the Rif War of the 1920s in the north, led by Abd el-Krim, and a growing nationalist movement. Sultan Mohammed V became a symbol of that movement and was exiled by the French in 1953, which increased unrest. He returned in 1955, and Morocco became independent from France in March 1956, followed by the end of most of the Spanish protectorate. Tangier had a special international status until 1956.

Since independence

Hassan II ruled from 1961 to 1999, a period of strong royal authority and political tension, and his son Mohammed VI succeeded him. The 2011 constitution, adopted after protests in the region, recognised Tamazight as an official language and changed some powers of parliament and government. The territory of Western Sahara, which Spain left in 1975, remains disputed between Morocco and the Polisario Front, and the United Nations has not treated the matter as settled. We note the dispute without taking a position, because travellers should know that governments give separate advice for the area.

Seeing the history

  • Volubilis for Roman and Mauretanian Morocco.
  • Fez el-Bali for the Idrisid and Marinid city.
  • Marrakech for the Almoravid, Almohad and Saadian legacy.
  • Meknes for the seventeenth-century Alaouite capital.
  • Rabat for the Kasbah of the Udayas, the Hassan Tower and the mausoleum of Mohammed V.
  • Essaouira and El Jadida for Portuguese and later fortifications on the Atlantic coast.

Where historians disagree

Dates for early dynasties vary by a few years between sources, and some claims, such as the oldest university, depend on definitions. The role of the Almoravids in the spread of Islam to West Africa is debated, as is the extent of Moroccan control over the Sahara in different periods. We have used the dates most commonly given in reference works.

Gold, salt and the Sahara trade

Morocco’s fortunes were tied to trans-Saharan trade. Caravans linked oases such as Sijilmasa, on the southern edge of the Atlas, with the Niger bend, carrying salt, cloth and manufactured goods south and gold, ivory and enslaved people north. Control of those routes helps explain the wealth of the Almoravids and later dynasties. In 1591 a Saadian army crossed the desert and defeated the forces of the Songhai Empire at Tondibi, after which Moroccan rulers tried to control the gold trade. The venture was costly and Moroccan authority over the Niger region faded within a few decades, a reminder that distance limited any state’s power. For the West African side of these links, see our article on the great West African kingdoms.

Jewish and Andalusian Morocco

Jewish communities lived in Morocco for many centuries, and their numbers grew after the expulsions from Spain at the end of the fifteenth century, when many Jews and Muslims moved south. Mellahs, the walled Jewish quarters of cities such as Fez and Marrakech, can still be visited, along with synagogues and cemeteries. Most Moroccan Jews emigrated after 1948, mainly to Israel, France and Canada, and a small community remains. The Andalusian influence from Spain is visible in music, architecture, cuisine and the layout of old houses, and some Fez families still trace descent from Andalusian refugees.

Reform and change in modern Morocco

A reform of the family code, the Moudawana, in 2004 raised the minimum marriage age for women to 18 and gave women more rights in divorce and guardianship, and further changes have been under discussion. Morocco has also invested in ports, renewable energy and railways, including a high-speed line between Tangier and Casablanca that opened in 2018. These changes sit beside continuing debates over inequality, unemployment among young people and press freedom, which are matters on which observers differ. We report them briefly, because this article concerns history and not current politics.

Share: WhatsApp · Email · Copy link

How we know this. This article summarises standard reference history of Morocco and was not re-checked line by line online for this edition. Dates for early dynasties vary slightly between sources. The Western Sahara paragraph states only that the status is disputed. A historian should review it before promotion.

Sources and further reading

  1. World History Encyclopedia, Morocco
  2. UNESCO World Heritage Centre, Volubilis
  3. UNESCO World Heritage Centre, Medina of Fez
  4. UNESCO World Heritage Centre, Medina of Marrakesh
ATC Editorial
The African Travel Chronicles editorial team researches and writes our guides and history features from official sources, academic work and recognised institutions. Each article lists its sources and a note on how we know what we report.

Contact: info@africantravelchronicle.com Pitches & partnerships: partnerships@africantravelchronicle.com