History of Marrakech
Marrakech is nearly a thousand years old, four dynasties behind it, and a name that ended up naming a whole country: 'Morocco' comes from 'Murrakush'. Every era left something you can still touch here - an Almoravid dome, an Almohad minaret, a ruined Saadian palace, a modern garden. Here is how to read the town like a timeline, dynasty by dynasty, contested dates included.
Marrakech reads like a timeline. Each dynasty that held the town left a monument you can still visit, and it is enough to put them back in order to get the town: the founders’ ablutions dome, the minaret of the conquerors from the South, the marble palace of a sultan enriched by African gold, the home of a late-19th-century vizier, the garden of a 20th-century painter. Here is that story, dynasty by dynasty, with what it left standing - and the few dates chroniclers and historians never quite agreed on.
A founding with two dates, a name that named Morocco
The town was born in the 11th century, on a stony plateau on the edge of the desert, within reach of the Atlas snows. On the year, uncertainty lingers: modern historians lean towards 1070, when tradition, echoed by most guides, holds 1062. The founding act goes back to the Almoravid chief Abu Bakr ibn Omar. His cousin Youssef ibn Tashfin would make it the capital of an empire stretching from Muslim Spain to the Senegal river.
The name is said to come from the Amazigh amur n akush, ‘land of God’ - the most common hypothesis, but the etymology stays debated. What is less debated: ‘Murrakush’ spread across all the languages of Europe. Marruecos, Maroc, Morocco - the country owes its name to its town and was long called the ‘kingdom of Marrakech’. As for its colour, it is no figure of speech. It is the iron oxide of the local earth, the ochre pisé the walls were built from and a regulation that still forces this hue on any new building. The town is red by decree as much as by geology.
The Almoravids: water before stone
Warriors from the Sahara, the Almoravids first worked as engineers. Before the monuments came the water: they spread the khettaras, those underground galleries with nearly no slope that tap the water table at the foot of the Atlas and bring it to town by pure gravity, no pump at all, marked out by ventilation wells. The emir Ali ibn Youssef entrusted the design to his engineer, a certain Abd Allah ibn Younous - nicknamed ‘al-Muhandis’, the engineer. Hundreds of these conduits irrigated the town and its gardens for over nine centuries. It is this invisible network, more than any wall, that made a great town possible at the gates of the desert.
From this founding dynasty, one single building remains: the Almoravid Qoubba, around 1117-1125, a former ablutions pavilion with a brick dome and interlaced arches, long buried under several metres of fill before being uncovered again. The town’s ramparts, often wrongly credited to the Almohads, are also Almoravid: raised in 1126-1127 under Ali ibn Youssef, in ochre pisé, over some nine to twelve kilometres. The Almohads would only later extend them.
The Almohads: the Koutoubia and the exported model
In 1147, a new power from the Atlas, the Almohads, took Marrakech and made it their capital. Their caliph, Abd al-Mumin, founded the Koutoubia mosque there straight away - then, judging the first misaligned with Mecca, had a second one rebuilt next to it, around 1158. Its 77-metre minaret, finished around 1195, would become a model: you find its silhouette and its decor in the Giralda in Seville and the Hassan tower in Rabat, built in the same wave. One Almohad hand on three monuments across two countries.
The Almohads added the kasbah south of town and gave it its ceremonial gate, Bab Agnaou, around 1188-1190: the only Marrakech gate carved in stone, when all the others are in pisé, framed by carved decor around a Qur’anic inscription. To the west, they laid out the Menara basin - whose pool itself, around 1157, was used to store water to irrigate olive trees and orchards, well before it became the postcard scene photographed today. The pavilion on the water came much later. The dynasty’s cradle, the mosque of Tinmel in the High Atlas, would be one of the great victims of the 2023 earthquake.
The Saadians: Songhai gold, sugar for marble
After two centuries of decline - the capital slid for a while to Fez - Marrakech regained its rank in the 16th century with the Saadians. Their sultan, Ahmed al-Mansour, called ‘the Golden’, reigned from 1578 to 1603. His prestige came from the Battle of the Three Kings (1578), where Portugal was crushed, and his fortune from a bold trans-Saharan expedition: in 1590-1591, his troops took Timbuktu, Djenné and Gao, and diverted the gold of the Songhai empire to Marrakech.
From this wealth, he built a palace, the El Badi, ‘the Incomparable’, raised from 1578 into the 1590s. Its legend speaks of ‘gold for sugar’. Reality is tastier and better documented: al-Mansour paid for the Carrara marble by the weight, kilo for kilo, in Moroccan sugar - Montaigne, passing near Pisa, saw craftsmen carving columns bound ‘for the king of Fez’ against sugar weighed on scales. The palace was later stripped bare by the Alaouite Moulay Ismaïl, who took the marble to Meknes. What remains is pisé walls and vast courtyards, worth mostly for what they suggest.
The Saadians also rebuilt the Ben Youssef medersa, finished around 1564, the biggest Qur’anic school in the Maghreb. And they had themselves buried in a rare-refinement necropolis, the Saadian Tombs. This is where the most surprising episode of the town plays out: Moulay Ismaïl had the necropolis walled up, on religious scruple, leaving only a discreet access. It disappeared from memory for over two centuries, until a French aerial photograph, in 1917, spotted it and returned it to the public.
The Alaouites: Meknes, the seven saints and the Bahia
The Alaouites, still the reigning dynasty today, took power in the 17th century. Moulay Ismaïl moved the capital to Meknes - hence the El Badi plundering and the sealing of the tombs. He is also credited, around 1691, with a purely political invention: the pilgrimage of the Seven Saints of Marrakech. By linking in a seven-day circuit the tombs of seven holy figures of the town - from Cadi Ayyad to Sidi Bel Abbès, the town’s patron saint - the idea was to hold the pilgrims in place and to compete with the rival Regraga pilgrimage on the Essaouira side. Devotion, here, also served to govern.
The great Alaouite monument in Marrakech is later: the Bahia palace, ‘the Brilliant’, raised from 1866 to 1900. Started by the vizier Si Moussa, it was extended piece by piece by his son Ba Ahmed, grand vizier and de facto regent of the country, until his death in 1900 - after which the palace was plundered right away. A little later, the same personal-power mechanic produced Thami El Glaoui, pasha of Marrakech from 1912 to 1956: master of the South, ally of the French, he hosted at Dar el Bacha, his home, both Churchill and Josephine Baker. The house is now a museum.
The protectorate and the century of gardens
In 1912, the treaty of Fez placed Morocco under French protectorate. Resident General Lyautey imposed a rule that shaped Marrakech for a century: do not touch the medina, and build a new town next door. That would be Guéliz, laid out from 1913, with straight avenues - its name probably comes from the neighbouring Jbel Guéliz, a hill whose Berber name points back to the very origins of the Almohads, rather than from the word ‘church’ often cited.
The protectorate mostly bequeathed gardens and addresses. La Mamounia opened in 1923 on a former princely orchard. The painter Jacques Majorelle bought the same year the plot of his future Jardin Majorelle, built a cubist villa there in 1931, invented in 1937 the cobalt blue that carries his name and opened it to the public in 1947. From this era comes the town’s finest anecdote: in January 1943, after the Casablanca conference, Winston Churchill settled in Marrakech and painted the Koutoubia tower from a terrace - the only painting he made in the whole war. Twelve years later, Hitchcock filmed the opening scenes of The Man Who Knew Too Much on Jemaa el-Fna. Morocco became independent again on 2 March 1956.
Marrakech today: listed, loved, tested
The medina was listed on UNESCO world heritage in 1985. The Jemaa el-Fna square, with its storytellers and its musicians, was recognised in 2001 as a ‘masterpiece of the oral heritage’ of humanity. In 1980, Yves Saint Laurent and Pierre Bergé bought the Jardin Majorelle, threatened by a real-estate project, and saved it. At the couturier’s death in 2008, his ashes were scattered in the rose garden of his nearby residence, and a stele was dedicated to him in the garden. A museum now carries his name, a few steps away.
On 8 September 2023, a magnitude 6.8 earthquake (per the USGS) struck the region. Its epicentre sat in the High Atlas, about 70 kilometres south-west. Most of the victims and destruction were in the Haouz mountain villages, not in the town. Marrakech was still hit - rampart sections, the small Kharbouch mosque minaret on Jemaa el-Fna - and the Almohad mosque of Tinmel, in the Atlas, was largely destroyed. The town stood back up quickly. Its monuments, for the most part, still stand, as they have for nine centuries.
Reading the town like a timeline
If you want to walk this story on foot, the order is simple. Start at the Almoravid Qoubba and the neighbouring medersa, the oldest. Then climb to the Koutoubia, an Almohad marker. Head south to the ruined El Badi and the Saadian Tombs for the 16th century, then the Bahia for the 19th. End at Guéliz and the Jardin Majorelle: eight centuries on, the town keeps adding chapters. Each of these places has its detailed sheet, with hours, prices and access.
Repères chronologiques
- c. 1070
Almoravid founding
Abu Bakr ibn Omar founded the town on the edge of the desert. His cousin Youssef ibn Tashfin made it the capital of an empire stretching from Spain to Senegal. Tradition holds 1062, modern historians 1070.
- 1126-1127
The pisé ramparts
Ali ibn Youssef ringed the town with nine to twelve kilometres of ochre walls. From this founding dynasty, one single building still stands: the Almoravid Qoubba (c. 1117-1125).
- 1147
The Almohads and the Koutoubia
Coming from the Atlas, they took Marrakech and founded the Koutoubia. Its minaret, finished around 1195, would serve as a model for the Giralda in Seville and the Hassan tower in Rabat.
- 13th-15th c.
Two centuries of decline
Power and capital slid towards Fez. Marrakech gradually faded from the front rank.
- 1578-1603
The Saadian peak
Ahmed al-Mansour, winner of the Battle of the Three Kings, diverted the Timbuktu gold and built the El Badi palace - Carrara marble paid in sugar, kilo for kilo. Ben Youssef medersa and Saadian Tombs date from the same century.
- 17th c.
The Alaouites, capital at Meknes
The still-reigning dynasty took power. Moulay Ismaïl moved the capital to Meknes, plundered El Badi and walled up the Saadian Tombs, forgotten for over two centuries.
- 1866-1900
The Bahia palace
The grand vizier Ba Ahmed built 'the Brilliant', the last great medina palace. It was plundered as soon as he died, in 1900.
- 1912
The French protectorate
The treaty of Fez placed Morocco under protectorate. Lyautey spared the medina and had the new town, Guéliz, laid out from 1913.
- 1923-1947
The century of gardens
La Mamounia opened in 1923. The same year, Jacques Majorelle bought his garden, invented his cobalt blue in 1937 and opened it to the public in 1947.
- 1956
Independence
Morocco became independent again on 2 March 1956.
- 1985-2001
Marrakech at UNESCO
The medina was listed as world heritage in 1985. Jemaa el-Fna was recognised as a masterpiece of the oral heritage of humanity in 2001.
- 2023
The Haouz earthquake
On 8 September, a magnitude 6.8 earthquake struck the High Atlas. The town, hit at the margins, stayed standing. The Almohad mosque of Tinmel, in the mountains, was largely destroyed.