Stand in Jemaa el-Fnaa at sunset, watch the Koutoubia minaret turn gold, and you are standing in a city that would not exist without the almoravid dynasty morocco built from nothing in the desert. Yet most English histories of Morocco skip straight from the Idrisids to the Almohads, as if Marrakech simply appeared. It did not. The Almoravids were desert warriors, preachers and empire-builders who turned a religious reform movement into one of the great powers of the western Mediterranean. This guide tells it properly: who they were, how they founded Marrakech, what they built, why they fell, and where you can still touch their world today.
In this guide:
- Why Most Visitors Miss the Founders of Marrakech
- Who Were the Almoravids? The Desert Ribat Movement
- Ibn Yasin: The Preacher Who Built an Army
- Yusuf ibn Tashfin and the Founding of Marrakech
- The Almoravid Dynasty Morocco Built Across Two Continents
- The Battle of Zallaqa (1086): Triumph in Spain
- Almoravid Architecture: What They Built
- Why the Almoravid Dynasty Fell to the Almohads
- Where to See Almoravid Traces Today
- Frequently Asked Questions
Why Most Visitors Miss the Founders of Marrakech
Ask a first-time visitor to name a Moroccan dynasty and you will hear the Almohads, the Marinids or the Saadians. Almost nobody says the Almoravids, and that is strange, because without them there would be no Marrakech to visit at all. The city that anchors every Morocco itinerary began as an Almoravid military camp on a dusty plain at the foot of the Atlas.
The almoravid dynasty morocco founded lasted barely a century, from the 1040s to 1147, and its monuments are few and fragile compared with the grand madrasas of Fes or the palaces of the Saadians. History rewards the builders of stone, and the Almoravids built in mud brick and ambition. Their legacy is not a skyline of palaces but something larger: the idea of Morocco itself as a single state stretching from the Sahara to the Mediterranean and across the strait into Spain.
There is another reason they are overlooked. The Almoravid dynasty Morocco was built by Saharan Berbers, camel nomads from the deep desert, and their story does not fit the neat picture of Morocco as a Mediterranean kingdom. Their first great leader was a preacher, not a prince. Their army wore the blue desert veil, the litham, which gave them their other name: the veiled ones, al-Mulaththamun. If you want the wider sweep of Moroccan history first, read our brief history of Morocco before diving in, because the Almoravids are the hinge on which that story turns.
Who Were the Almoravids? The Desert Ribat Movement

The Almoravids began not as a tribe but as a movement. In the 1030s, a Sanhaja Berber chieftain named Yahya ibn Ibrahim returned from pilgrimage to Mecca troubled by what he had seen at home: his people, the nomadic Sanhaja of the western Sahara, practised a rough, unlettered Islam mixed with older customs, and their oasis towns were prey to every passing raider.
He asked a scholar from the Sous valley, Abdallah ibn Yasin, to come and teach them. Ibn Yasin built a ribat — a fortified monastery on the edge of the desert, probably on an island in the Senegal River — where his followers lived, prayed, studied and drilled like soldiers. The Arabic name al-Murabitun, “those of the ribat”, became Almoravids in European languages.
What made the ribat different was discipline. Ibn Yasin imposed strict Maliki law, regular prayer, and a moral code that bound desert clans together for the first time. The movement spread by conversion, alliance and, when necessary, the sword. Within a decade the ribat had become an army, and the army had become a state. The almoravid dynasty morocco remembers today was therefore born as a reform movement, not a conquest for plunder. That zeal explains both their speed and their fatal rigidity in governing sophisticated cities. Our guide to the Idrisid dynasty and the founding of Fes shows the pattern they followed.
Ibn Yasin: The Preacher Who Built an Army
Abdallah ibn Yasin is one of the most consequential figures in Moroccan history and one of the least known outside it. He was a teacher from the Sous, never a king, who believed the desert tribes could be remade into a godly community, and he enforced that belief with whips as well as words. The tribes at first resented his strict discipline so fiercely that he was driven out and had to start again. But the men who stayed became the Sahara’s hardest fighting force: sober, disciplined, and convinced God was on their side.
Ibn Yasin died in battle against the Barghawata confederation on the Atlantic coast, and here honesty matters: the date of his death is disputed, given as 1058 or 1059 in different sources, and historians have not settled the question. That uncertainty is typical of the period: the dynasty left few records of its own and is known largely through later chroniclers. What is certain is that by his death the Almoravid dynasty Morocco had outgrown its founder. Leadership passed to the military commanders he had trained, above all to Abu Bakr ibn Umar and his cousin Yusuf ibn Tashfin, and the ribat became an empire.
Yusuf ibn Tashfin and the Founding of Marrakech
Yusuf ibn Tashfin was the Almoravids’ great builder, and the almoravid dynasty morocco owes him its capital, its coinage and its empire. A Sanhaja commander of the Lamtuna tribe, he took command around 1061 and proved general, administrator and city-founder at once. While Abu Bakr was away, Yusuf married his cousin’s wife Zaynab al-Nafzawiyya, a formidable political operator in her own right, and consolidated control of the north. When Abu Bakr returned, they divided the realm by agreement — Abu Bakr kept the Sahara, Yusuf took the north — freeing Yusuf to build.
Marrakech was founded as a military camp, and the date of its founding is contested: the traditional date is 1070, but several sources give 1071, and the question remains unsettled.
What is not disputed is the speed of the transformation. Yusuf chose a flat, well-watered plain at the foot of the High Atlas, on the caravan routes between the Sahara and the coast. He laid out a walled ksar with wells, underground channels, a first mosque and a palace of mud brick and pisé.
Within a generation, the Almoravid dynasty Morocco had turned a camp of tents and leather into a city of tens of thousands, the launchpad for the conquest of northern Morocco. Our Marrakech travel guide for first-time visitors walks you through the medina Yusuf founded, and it is worth reading with this history in mind: the straight streets of the old kasbah and the position of the Koutoubia still follow his plan.
The Almoravid Dynasty Morocco Built Across Two Continents
Between 1070 and 1106, the year of Yusuf’s death, the almoravid dynasty morocco created became the dominant power of the western Mediterranean. From Marrakech, the armies of the Almoravid dynasty Morocco took Fes in 1075, then Tangier, Ceuta and the Atlantic ports. By the 1080s they controlled all of present-day Morocco, western Algeria and the Sahara gold routes. Their gold dinars, struck from West African gold, became the standard currency of the Mediterranean — the maravedí of Spanish history takes its name from al-Murabitun. Caravans brought gold and salt north, and Andalusi scholars and craftsmen came south to a court with money to spend.
The reach of the Almoravid dynasty Morocco was remarkable for a movement that began in a desert monastery. At its height it stretched from the Senegal River to the Ebro valley in Spain, an arc of some 3,000 kilometres held together by caravans, cavalry and a single legal code. Yusuf ruled as Amir al-Muslimin, “Commander of the Muslims”, acknowledging the Abbasid caliph while exercising real sovereignty. It was an empire built on movement: the same mobility that made the Almoravids unstoppable in the desert made them the first Moroccan dynasty to rule both shores of the Strait of Gibraltar.
The Battle of Zallaqa (1086): Triumph in Spain
The Almoravid dynasty Morocco crossed into Spain because it was invited — and because it was needed. By 1085, Alfonso VI of León and Castile had taken Toledo, the old Visigothic capital, and the taifa kings of Muslim Spain, divided and frightened, begged Yusuf for help. He landed at Algeciras in 1086, and on 23 October met Alfonso at az-Zallaqa, near Badajoz, a field the Christians called Sagrajas. The battle was a catastrophe for Castile: Alfonso escaped wounded, but his army was destroyed.
Zallaqa made Yusuf a hero across the Muslim world and changed the almoravid dynasty morocco had built from a Moroccan state into a trans-Mediterranean empire. Over the next two decades the Almoravid dynasty Morocco absorbed the taifa kingdoms one by one — Granada, Seville, Cordoba, Valencia — and imposed their austere rule on the courts of al-Andalus. Andalusi poets mocked the veiled desert men as uncouth. But the Almoravids saved Muslim Spain from collapse, and their twenty years in al-Andalus left a lasting imprint on its architecture, its coinage and its law.
Almoravid Architecture: What They Built

Few Almoravid buildings survive, and that scarcity makes the survivors precious. The greatest is the Koubba al-Barudiyyin in Marrakech, a small domed pavilion built in the early 12th century, under Ali ibn Yusuf, as part of the ablutions complex beside the first Koutoubia mosque. Step inside and you see the earliest surviving carved stucco and scalloped dome that would define Moroccan architecture for centuries. Barely ten metres across, it is the most important Almoravid monument in the world.
Yusuf’s original Koutoubia mosque is gone — the present Koutoubia, the great minaret that dominates Marrakech, is Almohad, built on the site of its Almoravid predecessor — but the Almoravid imprint is in the city’s bones: the first walls, the khettara channels that still water the palm grove, and the kasbah’s layout.
In Tlemcen, across today’s Algerian border, the Great Mosque the Almoravid dynasty Morocco founded in 1136 is one of the finest Almoravid buildings anywhere, its carved dome and mihrab a direct ancestor of the Koutoubia’s decoration. The almoravid dynasty morocco built in brick and plaster rather than stone, which is why so little survives — and why what does survive deserves a slow visit.
Why the Almoravid Dynasty Fell to the Almohads
The Almoravids fell as they had risen: to a movement accusing them of the sins they had once denounced. By the 1120s, the rulers of the Almoravid dynasty Morocco had become comfortable city dwellers. Their princes wore silk, their courts in Marrakech and Seville patronised poets, and the strict Maliki scholars who had legitimised the movement were embarrassed by the luxury.
Into this complacency stepped Ibn Tumart, a scholar from the High Atlas who preached that the Almoravids had corrupted the faith. His followers, the Almohads — “those who proclaim the unity of God” — built their own mountain state in the Atlas, and after Ibn Tumart’s death his successor Abd al-Mu’min laid siege to Marrakech. The city fell in 1147. The last Almoravid ruler was killed, and a dynasty that had lasted barely a century was erased almost overnight.
The Almohads were Moroccan, and they inherited the state the Almoravids had built — capital, bureaucracy, coinage and empire in Spain. The almoravid dynasty morocco had created was too useful to destroy. That is the pattern of Moroccan history: each dynasty denounces its predecessor and then moves into its palace. The Almohads rebuilt the Koutoubia and ruled the same empire from the same city. The Almoravids vanished as rulers, but their achievement — a unified Moroccan state with Marrakech as its capital — survived them, and every dynasty since has ruled from the map they drew.
Where to See Almoravid Traces Today
The best place to meet the Almoravid dynasty Morocco is Marrakech, on foot, in the morning before the heat. Start at the Koubba al-Barudiyyin, beside the Ben Youssef Madrasa: small, it repays twenty unhurried minutes. Then cross to the Koutoubia and walk the gardens where Yusuf’s first mosque stood; the minaret is Almohad, but the ground is Almoravid. End in the palm grove, the Palmeraie, whose irrigation channels are the dynasty’s most practical legacy — water engineering that still shapes the city. Our Marrakech travel guide gives the full walking route.
Beyond Marrakech, the traces thin but reward the effort. In Fes, the Qarawiyyin mosque complex preserves Almoravid work in its courtyard and minaret, best seen from the surrounding streets since the mosque itself is closed to non-Muslims. Near Volubilis, Moulay Idriss Zerhoun sits on the landscape the Almoravid dynasty Morocco marched through on its way north. For the dynasties that followed, read our guides to the Marinids of Fes and the Saadians. The table below gives the practical details for the main Almoravid sites, with entry prices checked in November 2026.
| Site | Where | What is Almoravid | Entry (Nov 2026) |
|---|---|---|---|
| Koubba al-Barudiyyin | Marrakech medina, beside Ben Youssef Madrasa | Domed ablutions pavilion, c. early 1100s; oldest surviving Almoravid monument | ~30 MAD (~$3) |
| Koutoubia Mosque (exterior and gardens) | Marrakech, near Jemaa el-Fnaa | Site of Yusuf’s first great mosque; present minaret is Almohad | Free (exterior) |
| Ben Youssef Madrasa | Marrakech medina | Site of the Almoravid mosque and madrasa; present building is Marinid/Saadian | 50 MAD (~$5) |
| Qarawiyyin Mosque (exterior) | Fes el-Bali | Almoravid-era courtyard and minaret base, rebuilt under Ali ibn Yusuf | Free (exterior; interior closed to non-Muslims) |
| Great Mosque of Tlemcen | Tlemcen, Algeria (day trip from Oujda region is impractical; visit from Algeria) | Founded 1136, finest surviving Almoravid mosque decoration | Free |
| Marrakech Palmeraie | North-east Marrakech | Khettara irrigation channels pioneered under the Almoravids | Free to drive or cycle through |
Prices are approximate; the Koubba and the madrasa are the only two paid entries here, and both are inexpensive. Visit in this order: the Koubba first, for the architecture, then the Koutoubia gardens, for the scale of the city Yusuf imagined. The almoravid dynasty morocco founded is best understood in that order — a small carved dome, then a whole city.
Frequently Asked Questions
Who were the Almoravids?
The Almoravid dynasty Morocco (al-Murabitun, “those of the ribat”) began as Saharan Sanhaja Berbers, a religious reform movement in the 1040s under the preacher Abdallah ibn Yasin that became the ruling dynasty of Morocco and Muslim Spain. They founded Marrakech and created the first unified Moroccan state.
When did the Almoravid dynasty rule Morocco?
The almoravid dynasty morocco ruled roughly from the 1040s, when the ribat movement became a military power, until 1147, when the Almohads took Marrakech. Its great period was Yusuf ibn Tashfin’s reign (1061–1106).
Did the Almoravids really found Marrakech?
Yes. Marrakech was founded as an Almoravid military camp by Yusuf ibn Tashfin; the traditional date is 1070, though some sources give 1071, and the exact date remains unsettled among historians. Before the Almoravids there was no city on the site — only a plain on the caravan routes at the foot of the High Atlas.
What was the Battle of Zallaqa?
The Battle of Zallaqa (also called Sagrajas), fought on 23 October 1086 near Badajoz in Spain, was the Almoravids’ great victory over Alfonso VI of León and Castile. Yusuf ibn Tashfin’s desert army destroyed the Castilian force and halted the Christian advance into Muslim Spain for a generation, opening the way for Almoravid rule in al-Andalus.
What Almoravid buildings can I still see today?
The finest survivor is the Koubba al-Barudiyyin in Marrakech, a domed pavilion from the early 1100s and the oldest Almoravid monument in Morocco. You can also visit the site of Yusuf’s first Koutoubia mosque, the Qarawiyyin in Fes, and the Great Mosque of Tlemcen, founded in 1136.
Why did the Almoravids fall?
The Almoravid dynasty Morocco fell to the Almohads, a rival Berber reform movement from the High Atlas led first by Ibn Tumart and then by Abd al-Mu’min, who accused the Almoravids of luxury and religious corruption and took Marrakech in 1147. The Almohads then inherited the empire the Almoravids had built, including its capital and its Spanish territories.
Conclusion: The Dynasty History Forgot
The Almoravids deserve better than a footnote. In a single century, desert preachers and veiled cavalrymen built a capital from a campsite, unified Morocco, saved Muslim Spain at Zallaqa, and minted the Mediterranean’s standard gold coin. They left few monuments, but they left something more durable: the map of Morocco itself. Every dynasty that followed — Almohads, Marinids, Saadians, Alaouites — ruled from Marrakech or Fes, on the roads and with the institutions the Almoravid dynasty Morocco had made. Walk the medina, stand under the Koubba’s small carved dome, and you are looking at the beginning of the country.
Sources: Almoravid dynasty — Wikipedia; Medina of Marrakech — UNESCO World Heritage. Entry prices checked November 2026; the founding date of Marrakech (1070 or 1071) and the death date of Ibn Yasin (1058 or 1059) are explicitly unsettled in the historical sources.