History of Marrakech:
a thousand years in red.
The history of Marrakech begins around 1070, when the Almoravids founded it as their capital at the foot of the High Atlas. The Almohads took it in 1147 and raised the Koutoubia, and the Saadians made it a royal capital again in the 16th century. French planners added Gueliz after 1912, UNESCO listed the medina in 1985, and the city recovered from the 2023 earthquake.
Quick facts
Marrakech history
at a glance.
Checked on 28 November 2026 against official and reference sources (listed at the bottom of the page).
| History | |
|---|---|
| Founded | About 1070, by the Almoravids (some chroniclers say 1061–62) |
| First walls | 1120s, under Ali ibn Yusuf |
| Almohad conquest | April 1147, after an 11-month siege |
| Koutoubia minaret | About 77 m, probably finished around 1195 |
| Saadian capital | From 1525 into the early 17th century |
| Protectorate | 1912–1956; French troops entered on 9 September 1912 |
| UNESCO | Medina, World Heritage since 1985; Jemaa el-Fna, intangible heritage (proclaimed 2001, inscribed 2008) |
| Walls today | About 19 km, with 20 gates and 200 towers |
| Earthquake | 8 September 2023 at 23:11, epicentre about 73 km south-west |
Book in one minute
Plan
your transfer.
Popular routesTaxi Marrakech EssaouiraTaxi Agadir EssaouiraTaxi Casablanca EssaouiraEssaouira airport taxi
In detail
What to
know.
An Almoravid camp becomes a capital
Marrakech was founded around 1070 by the Almoravids, a Berber dynasty from the Sahara; some chroniclers give 1061–62 instead. Abu Bakr ibn Umar started the settlement and his cousin Yusuf ibn Tashfin built the first brick mosque in early 1071. In the 1120s Ali ibn Yusuf (r. 1106–1142) gave the city its first walls, waterworks and the first Ben Youssef Mosque. Bab Doukkala, built around 1126, still keeps its original bent entrance.
Palms and underground channels
The Almoravids also created the Palmeraie on the northern edge of the city, watered by khettaras, underground channels that bring water from the Atlas. A legend says the palms grew from date stones dropped by Yusuf ibn Tashfin’s soldiers camped on the Haouz plain. The same kind of khettara system later fed the Menara and Agdal gardens, both part of the UNESCO site today.
The Almohads and the Koutoubia
In April 1147, after an eleven-month siege, the Almohad leader Abd al-Mu’min took the city. The Koutoubia Mosque was built from 1158, and its 77-metre minaret was probably finished around 1195 under Yaqub al-Mansur, who also built the Kasbah. The name comes from the booksellers, the kutubiyyin, who worked nearby. The tower likely inspired the Giralda in Seville and the Hassan Tower in Rabat. Non-Muslims cannot go inside.
Marinid years in the shadow of Fez
The Marinids captured Marrakech in September 1269 and moved the capital to Fez. For more than two centuries Marrakech was a regional capital of the south rather than the seat of the sultans. One trace of this period survives: an earlier madrasa on the site of the Ben Youssef Madrasa was founded under the Marinid sultan Abu al-Hasan (r. 1331–1348).
The Saadian golden age
The Saadians took Marrakech in 1525 and kept their court here. Abdallah al-Ghalib rebuilt the Ben Youssef Madrasa in 1564–65 with 130 student rooms. Ahmad al-Mansur (r. 1578–1603) began El Badi Palace in 1578, probably paid for by the ransom the Portuguese paid after the Battle of the Three Kings. The Saadian Tombs hold 56 marble-marked tombstones; al-Mansur lies in the Chamber of the Twelve Columns.
The Alaouites: Meknes, then back
Moulay al-Rashid took Marrakech in 1669. Moulay Ismail sacked it in 1677, moved the capital to Meknes and had El Badi stripped for building materials, notably in 1707–08. He also sealed the Saadian Tombs off from most surrounding buildings. Muhammad III ibn Abdallah, who reigned after 1757, made Marrakech his favourite residence and de facto capital again, and rebuilt much of the Kasbah.
The viziers’ palaces
In the 1860s the grand vizier Si Musa began the Bahia Palace, and his son Ba Ahmed, grand vizier from 1894 to 1900, enlarged it to about 150 rooms on almost 2 hectares. Its Grand Courtyard of Carrara marble, from 1896–97, measures 50 by 30 metres. Sultan Muhammad IV built the present Menara pavilion, completed in 1870, on the ruins of a Saadian one.
The protectorate and the new town
The Treaty of Fez of 30 March 1912 began the French protectorate, and French troops entered Marrakech on 9 September 1912. Thami El Glaoui was pasha of the city from 1912 to 1956. The planner Henri Prost drew the new town of Gueliz, which grew in the 1920s, and began Hivernage in 1928. Jacques Majorelle started his garden in 1923 and La Mamounia hotel opened in 1929.
Independence and a world meeting place
Morocco regained its independence on 2 March 1956. In the 1960s Marrakech became a hippie destination, and it later turned into a city of international meetings: the Marrakech Agreement that created the World Trade Organization was signed here on 15 April 1994, and COP22, the UN climate conference, met here from 7 to 18 November 2016.
UNESCO and Jemaa el-Fna
UNESCO inscribed the Medina of Marrakesh on the World Heritage List in 1985. The old city covers about 1,107 hectares inside some 19 km of orange-red walls with 20 gates and 200 towers. UNESCO proclaimed the cultural space of Jemaa el-Fna in 2001 and inscribed it on the intangible heritage list in 2008, for its storytellers, musicians and other living traditions.
The 2023 earthquake
At 23:11 on 8 September 2023 an earthquake of magnitude 6.8 to 6.9 struck near Ighil in Al Haouz province, about 73 km south-west of Marrakech. At least 2,960 people died, most of them in mountain villages. In the medina some old houses and parts of the walls fell, and the minaret of the Kharbouch Mosque on Jemaa el-Fna collapsed. The Bahia Palace and the Saadian Tombs reopened in October 2023, the Koutoubia in March 2024.
Following the story on foot and by car
Walk the dynasties in order: the Koutoubia, then the Saadian Tombs and El Badi in the Kasbah, the Bahia Palace, and the Ben Youssef Madrasa in the north of the medina. A petit taxi is quickest between the medina, Gueliz and the Menara. For history beyond the walls, such as Aït Ben Haddou or a taxi Marrakech Essaouira trip to the 18th-century port, a private driver is easier: GoTouris is licensed, available 24/7 and booked on WhatsApp.
Local tips
Good to
know.
Go at opening time
The Bahia Palace and the Saadian Tombs fill up by late morning, so start your history walk early.
Use an official guide
A badged guide brings the dynasties to life; agree the route and the price before you start.
Fixed price for day trips
For a day beyond the walls, book a taxi on WhatsApp: one fixed price per vehicle, paid to the driver at the end.
Questions
Your questions, answered.
Who founded Marrakech?
The Almoravids, a Berber dynasty. Abu Bakr ibn Umar started the settlement around 1070 and his cousin Yusuf ibn Tashfin built the first brick mosque in 1071; some chroniclers date the founding to 1061–62.
Why is Marrakech called the Red City?
Because its walls and old buildings are made of orange-red clay and chalk. Under the protectorate, building rules in the new town also required ochre facades.
How old is the Koutoubia?
The present mosque was built from 1158 and its 77-metre minaret was probably completed around 1195, under the Almohad caliph Yaqub al-Mansur.
When did Marrakech become a UNESCO site?
The medina was inscribed as a World Heritage Site in 1985. Jemaa el-Fna square was proclaimed intangible heritage in 2001 and inscribed on the list in 2008.
Was Marrakech damaged in the 2023 earthquake?
Partly. Some old houses and sections of the walls fell and the Kharbouch Mosque minaret collapsed, but the worst damage was in the Atlas villages. The Bahia Palace and Saadian Tombs reopened in October 2023.
Was Marrakech ever the capital of Morocco?
Yes, several times: under the Almoravids and the Almohads, again under the Saadians in the 16th century, and as the favourite residence and de facto capital of Sultan Muhammad III after 1757.
Can I visit Essaouira from Marrakech in a day?
Yes. It is about 175 km, about 2 h 30 each way by road. A GoTouris private taxi starts at 800 DH one way per SUV for up to 4 people, a fixed price per vehicle.
Sources
Where these
facts come from.
Checked on 28 November 2026. Opening hours, prices and dates change: confirm before you go.
- Wikipedia — History of Marrakesh
- Wikipedia — Marrakesh (medina, walls and gates)
- Wikipedia — Kutubiyya Mosque
- UNESCO Intangible Cultural Heritage — Jemaa el-Fna Square
- Wikipedia — 2023 Marrakesh–Safi earthquake
- Wikipedia — Bahia Palace
- Wikipedia — El Badi Palace
- Wikipedia — Saadian Tombs
- Wikipedia — Bab Doukkala
More guides
Keep
reading.
Things to do in Marrakech
Things to do in Marrakech, grouped: Jemaa el-Fna, palaces and tombs, the madrasa, Majorelle and other gardens, the souks, the Mellah and easy day trips.
Read the guide →Marrakech travel guide
The complete Marrakech travel guide: Jemaa el-Fna, palaces, gardens, souks, food, day trips, weather by month, the airport, getting around and scams to avoid.
Read the guide →Marrakech to Essaouira day trip
Planning a day trip from Marrakech to Essaouira? About 2 h 30 each way: private driver, group tour or bus compared, plus what to see in one day.
Read the guide