Wednesday, November 18, 2026

Subscribe

NewsEdition MoroccoMorocco

How the Almoravids made Marrakech the heart of an empire

Rooted in Saharan networks, the Almoravids founded Marrakech and built a power linking Morocco, West Africa and al-Andalus. Their history sheds light on the role of trade routes, faith and cities in medieval Africa.

A Moroccan employee hands a file to a member of the public at a contemporary public service counter in Marrakech

Before it became a Moroccan capital, Marrakech was a political project. Its foundation in the 11th century accompanied the rise of a Saharan power capable of linking the routes of West Africa, the cities of the Maghreb and the Muslim principalities of al-Andalus.

The Almoravids, also known as the Murabitun, were therefore more than a military dynasty. Their history tells of the meeting between Saharan Sanhaja tribes, Maliki jurists, trans-Saharan merchants and urban powers established north of the Strait of Gibraltar.

A religious movement born on the fringes of the Sahara

At the beginning of the 11th century, the Muslim world was politically fragmented. The Abbasid caliphate in Baghdad retained religious prestige, but its direct authority had diminished. In the western Maghreb and the Sahara, several powers vied for control of cities, oases and trade routes.

The Almoravid movement emerged in this environment. It drew support from Sanhaja groups, particularly the Lamtuna, Massufa and Godala, who controlled part of the routes linking the Sahara with the Senegal River region and the Maghreb.

The preacher Abdallah Ibn Yassin played a central role in this development. His teaching emphasised religious discipline, the application of Maliki law and the cohesion of the group. The term “Almoravid” itself refers to the ribat, a place associated with religious teaching, spiritual retreat and armed defence.

Religion alone, however, cannot explain their success. The Almoravids also benefited from their direct knowledge of the desert, its resources and its networks. Their power rested on a mobile military organisation, but also on their ability to secure caravan stops.

Marrakech, a capital between the desert and the Maghreb

In the second half of the 11th century, the Almoravids extended their authority northwards. They took control of important centres in present-day Morocco, including Fez, and established a new capital on the Haouz plain.

Marrakech is generally dated to around 1070–1072. The city quickly became a centre of command, trade and religious influence. Its location made it possible to monitor the passes through the High Atlas while maintaining links with routes from the Sahara.

The capital should not be understood as a mere military base. It organised a wider political space. From there, the Almoravid rulers administered urban territories, agricultural areas, oases and caravan routes. This combination helps explain Marrakech’s longevity as a major centre in Morocco.

The Almoravids also encouraged the movement of goods and people. Gold from West Africa, Saharan salt, textiles, horses and agricultural produce fuelled trade linking regions now separated by several national borders.

An empire built on the gold routes

Trans-Saharan trade was one of the drivers of Almoravid expansion. Caravans linked the cities of the Maghreb with the kingdoms of the Sahel. They carried goods, but also ideas, religious practices, techniques and forms of writing.

The Almoravids minted their own currency. The Almoravid dinar, often associated with a high gold content, circulated widely across the western Islamic world. This currency facilitated transactions and bolstered the government’s credibility among merchants and urban authorities.

The link with the former kingdom of Ghana must, however, be presented with caution. Arab sources describe intensive trade between Muslim networks in the Sahara and the powers of the Sahel. The idea of a direct Almoravid conquest of Ghana in 1076, by contrast, remains disputed among historians.

Recent research instead favours the hypothesis of gradual influence. This would have rested on trade, the presence of Muslim communities, alliances and the movement of scholars. This distinction matters: it avoids turning a complex history into a straightforward story of conquest.

From military assistance to the seizure of power in al-Andalus

To the north, the Almoravids intervened in the Iberian Peninsula at a time when the Muslim kingdoms of al-Andalus were divided into rival principalities known as taifas. These powers sought to preserve their autonomy, but faced growing pressure from the Christian kingdoms of the north.

After Alfonso VI captured Toledo in 1085, several Andalusian rulers called on Yusuf ibn Tashfin, the leading Almoravid chief, for help. Forces from the Maghreb faced the Castilian army at Zallaqa, near Badajoz, on 23 October 1086, according to the historical sources generally accepted.

The victory checked the Castilian advance. It did not, however, resolve al-Andalus’s political divisions. After returning to the Maghreb, Yusuf ibn Tashfin intervened again. From 1090 onwards, the Almoravids gradually took control of several taifas, including Granada, Córdoba and Seville.

The shift from military ally to sovereign power revealed an enduring tension. The Andalusian princes had hoped to secure temporary protection. The Almoravids, for their part, sought to unify a political space they considered threatened by internal rivalries and the advance of the Christian kingdoms.

A memory that spans the Sahara

The Almoravid legacy is not confined to Morocco’s borders. It forms part of a Saharan history shared with Mauritania, Senegal, Mali, Algeria and Spain. Ancient routes fostered lasting contacts between the societies of the desert, the Sahel and the Maghreb.

In Mauritania, the ancient ksour of Chinguetti, Ouadane, Tichitt and Oualata bear witness to the importance of relay towns in this history. UNESCO describes these ancient cities as centres linked to caravan routes and the Islamic culture of the Sahara.

These cities were not all founded by the Almoravids. Some developed later, in a region already shaped by medieval trade. Their memory nonetheless preserves traces of a connected world in which manuscripts, goods and travellers moved between North and West Africa.

This memory is particularly visible in Chinguetti, Ouadane and Tichitt. Private libraries, ancient mosques and stone architecture recall the role of Saharan scholars and merchants. They also show that the desert was a space of movement and knowledge, not an empty divide between societies.

What the Almoravid era still reveals today

Almoravid history sheds light on a reality that is often overlooked: African regions were already connected by complex political, economic and cultural networks. Marrakech did not develop in isolation from the Sahara. It was built on the foundations of these exchanges.

It also reminds us that medieval political identities were composite. The Almoravids brought together nomadic and settled populations, Saharan and Maghrebi groups, merchants, jurists and soldiers. Their empire took different forms depending on the region and the balance of power.

Finally, their trajectory shows the limits of any power founded on conquest. After several decades of expansion, the Almoravids faced a challenge from the Almohads, a movement that also emerged in the Maghreb. Marrakech nevertheless remained at the heart of the new dynasty and retained its role as a major capital of Morocco.

From the Sahara to Andalusia, the Almoravid era remains a story of connections. It speaks of faith and power, but also of trade, urbanisation and the circulation of knowledge. It is a fully African history, whose traces can still be read in the continent’s cities, routes and memories.

Automatic translation. Original French version

The quiz

Edition MoroccoMorocco in 5 questions

5 questions