History of Marrakech

Marrakech was founded in 454 A.H., corresponding to the year 1062 A.D. by Youssef Ibn Tachfin, the first ruler of the Almoravid dynasty. The different historical sources do not agree on the meaning of the word Marrakech, but it seems to come from the expression masmouda “marrakouch”, which means “to go fast”, in allusion to the danger of ambush that it represents.

The Almoravids

The Almoravids were a Berber people composed of 70 tribes who inhabited Mauritania from time immemorial and whose religious beliefs were initially based on magic and witchcraft. Around 1035, one of the Almoravid chiefs called upon Abdallah Ibn Yassin to introduce Islam to the tribes.

Abu Baker was called to the south to contain an uprising and entrusted the fate of the new city, as well as his disinherited wife Zaynab, to his 60-year-old cousin Youssef, with the promise to return and take back the power and his wife if he returned from the military campaign. Legends attribute the foundation of Marrakech to Youssef Ben Tachfine, and tell that when he arrived in the Haouz plain, his soldiers rested by eating dates, whose pits fell to the ground and later gave birth to the immense palm grove of Marrakech.

In reality, it was Youssef who was responsible for the construction of the city, the drilling of water wells, the development of a large weekly rural market, an administrative system and the organization of an army that included blacks and Christians.
When Abu Baker returned two years later, reclaiming what he considered his property, Youssef sent gifts to his trusted cousin to let him know that there was no more room for him in the expanding town. Abu Baker retired to Niger, where he died in 1087.

Marrakech was surrounded by a fortified defensive wall and Youssef set out to conquer northern Morocco and southern Spain, which were threatened by the Christian reconquest of Alfonso VI and El Cid Campeador, who were defeated at the battle of Zellaca. Youssef brought with him the art and architecture of the Andalusian civilization to beautify Marrakech.

Very soon, Marrakech, under the impulse of the Almoravids, pious and austere men, many mosques and medersas (schools of Koranic theology) were built, as well as a commercial center for the Maghreb and Black Africa. Marrakech grew rapidly and established itself as an influential cultural and religious center, and ramparts were built to protect the city.

It was the end of the Almoravid dynasty. The Almohad fury then the Alaouite fury made disappear almost all the architectural vestiges of the founders of Marrakech; an ablutions fountain, the Almoravid qubba, was mysteriously spared, and the irrigation system by kettara was, of course, preserved.

Video history of the foundation of Marrakech

In 1147, the Almohads, partisans of a pure and hard Islam seized the city walls, the last Almoravids exterminated, almost all the monuments destroyed. The Almohads built many palaces and religious buildings, such as the famous Koutoubia mosque built on the ruins of an Almoravid palace.

In order to feed the palm grove and the large gardens, an irrigation system was perfected. Marrakech’s cultural influence attracted many writers and artists, especially from Andalusia.

In 1269, Marrakech was conquered by the Merinid nomads at the expense of the last Almohads. When the Marinid dynasty came to power, Marrakech fell into a certain lethargy, and its decline led to the loss of its status as capital to its great rival, Fez.

At the beginning of the sixteenth century, Marrakech became again the capital of the kingdom, quickly reaching its apogee, in particular thanks to the Saadian sultan, Mohammed El Mahdi. Thanks to the fortune amassed by the sultans, Marrakech was embellished, the ruined monuments were restored and sumptuous palaces were built.

Marrakech will again lose its status of capital.

At the end of the 17th century, the current Alaouite dynasty succeeded the Saadians. The throne was successively transferred to Fez and then to Meknes, the new imperial city.

At the beginning of the 20th century, Marrakech experienced several years of civil wars.

In 1912, the establishment of the French protectorate in Morocco put an end to this anarchy. In 1956, the return from exile of King Mohammed V was celebrated in Marrakech as in the rest of the country.


Marrakech’s economy is based mainly on tourism, trade and crafts. The hotel infrastructure has grown rapidly. The future development of Marrakech also revolves around the Settat-Marrakech highway of 146 km finished in 2007. On the south side, another motorway section Marrakech-Agadir of 233 Km in 2009. A TGV line linking the city to Casablanca is under study, to be extended to Agadir.


The city is a tourist mecca, with more than 2 million tourists each year.