The Marrakesh area was inhabited by
Berber farmers from
Neolithic times, and numerous stone implements have been unearthed in the area. Marrakesh was founded by
Abu Bakr ibn Umar, chieftain and second cousin of the
Almoravid king
Yusuf ibn Tashfin (c. 1061–1106). Historical sources cite a variety of dates for this event ranging between 1062 (454 in the
Hijri calendar), according to
Ibn Abi Zar and
Ibn Khaldun, and 1078 (470 AH), according to
Muhammad al-Idrisi. The date most commonly used by modern historians is 1070, although 1062 is still cited by some writers.
Imperial capital minted during the reign of
Ali ibn Yusuf|left The Almoravids, a Berber dynasty seeking to reform Islamic society, ruled an
emirate stretching from the edge of
Senegal to the centre of
Spain and from the Atlantic coast to
Algiers. They used Marrakesh as their capital and established its first structures, including mosques and a fortified residence, the Ksar al-Hajjar, near the present-day
Kutubiyya Mosque. These Almoravid foundations also influenced the layout and urban organization of the city for centuries to come. For example, the present-day
Jemaa el-Fnaa originated from a public square in front of the Almoravid palace gates, the
Rahbat al-Ksar, and the major souks (markets) of the city developed roughly in the area between this square and the city's main mosque, where they remain today. The city developed the community into a trading centre for the
Maghreb and sub-Saharan Africa. It grew rapidly and established itself as a cultural and religious centre, supplanting
Aghmat, which had long been the capital of
Haouz.
Andalusi craftsmen from
Cordoba and
Seville built and decorated numerous monuments, importing the
Cordoban Umayyad style characterised by carved domes and
cusped arches. This Andalusian influence merged with designs from the Sahara and West Africa, creating a unique style of architecture which was fully adapted to the Marrakesh environment. Yusuf ibn Tashfin built houses, minted coins, and brought gold and silver to the city in caravans. His son and successor,
Ali Ibn Yusuf, built the
Ben Youssef Mosque, the city's main mosque, between 1120 and 1132. He also fortified the city with
city walls for the first time in 1126–1127 and expanded its water supply by creating the underground water system known as the
khettara. , the
Almohad-era gate of the
Kasbah (photo ) In 1125, the preacher
Ibn Tumart settled in
Tin Mal in the mountains to the south of Marrakesh, founding the
Almohad movement. This new faction, composed mainly of
Masmuda tribesmen, followed a
doctrine of radical reform with Ibn Tumart as the
mahdi, a messianic figure. He preached against the Almoravids and influenced a revolt which succeeded in bringing about the fall of nearby
Aghmat, but stopped short of bringing down Marrakesh following an
unsuccessful siege in 1130. Ibn Tumart died shortly after in the same year, but his successor
Abd al-Mu'min took over the political leadership of the movement and
captured Marrakesh in 1147 after a siege of several months. The Almohads purged the Almoravid population over three days and established the city as their new capital. They went on to take over much of the Almoravids' former territory in Africa and the
Iberian Peninsula. In 1147, shortly after the city's conquest, Abd al-Mu'min founded the Kutubiyya Mosque (or Koutoubia Mosque), next to the former Almoravid palace, to serve as the city's new main mosque. The Almoravid mosques were either demolished or abandoned as the Almohads enacted their religious reforms. Abd al-Mu'min was also responsible for establishing the
Menara Gardens in 1157, while his successor
Abu Ya'qub Yusuf (r. 1163–1184) began the
Agdal Gardens.
Ya'qub al-Mansur (r. 1184–1199), possibly on the orders of his father Abu Ya'qub Yusuf, was responsible for building the
Kasbah, a citadel and palace district on the south side of the city. The Kasbah housed the center of government and the residence of the
caliph, a title borne by the Almohad rulers to rival the eastern
Abbasid Caliphate. In part because of these various additions, the Almohads also improved the water supply system and created water reservoirs to irrigate their gardens. Thanks to its economic, political, and cultural importance, Marrakesh hosted many writers, artists, and intellectuals, many of them from
Al-Andalus, including the famous philosopher
Averroes of
Cordoba. #181. The cantiga #181 depicts the successful 1261–62 defence of Marrakesh by Almohad ruler
Al-Murtada (with help from Christian militias) from the siege laid on by Marinid ruler
Abu Yusuf. The death of
Yusuf II in 1224 began a period of instability. Marrakesh became the stronghold of the Almohad tribal sheikhs and the
ahl ad-dar (descendants of
Ibn Tumart), who sought to claw power back from the ruling Almohad family. Marrakesh was taken, lost and retaken by force multiple times by a stream of caliphs and pretenders, such as during the brutal seizure of Marrakesh by the Sevillan caliph
Abd al-Wahid II al-Ma'mun in 1226, which was followed by a massacre of the Almohad tribal sheikhs and their families and a public denunciation of Ibn Tumart's doctrines by the caliph from the pulpit of the
Kasbah Mosque. After al-Ma'mun's death in 1232, his widow attempted to forcibly install her son, acquiring the support of the Almohad army chiefs and Spanish mercenaries with the promise to hand Marrakesh over to them for the
sack. Hearing of the terms, the people of Marrakesh sought to make an agreement with the military captains and saved the city from destruction with a sizable payoff of 500,000 dinars. In 1269, Marrakesh was conquered by
the Marinids, a
Zenata tribe who overran the Almohads in Morocco. While Marrakesh remained a major city, it lost its capital status to Fez and underwent a period of relative decline. , built by the
Saadi sultan
Ahmad al-Mansur (16th century)
Saadi period In the early 16th century, Marrakesh again became the capital of Morocco. After a period when it was the seat of the
Hintata emirs, it reestablished its status during the reigns of the
Saadian sultans
Abdallah al-Ghalib and
Ahmad al-Mansur. Under the Saadian dynasty, Marrakesh experienced a new golden age. Thanks to the wealth amassed by the sultans, it was embellished with sumptuous palaces while its ruined monuments were restored.
El Badi Palace, begun by Ahmad al-Mansur in 1578, was made with costly materials including marble from Italy. The palace was intended primarily for hosting lavish receptions for ambassadors from Spain, England, and the Ottoman Empire, showcasing Saadian Morocco as a nation whose power and influence reached as far as the borders of
Niger and
Mali. . For centuries Marrakesh has been known as the location of the tombs of Morocco's
seven patron saints (
sabʿatu rijāl). When
sufism was at the height of its popularity during the late 17th-century reign of
Moulay Ismail, the festival of these saints was founded by
Abu Ali al-Hassan al-Yusi at the request of the sultan. The tombs of several renowned figures were moved to Marrakesh to attract pilgrims, and the pilgrimage associated with the seven saints is now a firmly established institution. Pilgrims visit the tombs of the saints in a specific order, as follows:
Sidi Yusuf Ali Sanhaji (1196–97), a leper;
Qadi Iyyad or
qadi of
Ceuta (1083–1149), a theologian and author of
Ash-Shifa (treatises on the virtues of
Muhammad);
Sidi Bel Abbas (1130–1204), known as the patron saint of the city and most revered in the region;
Sidi Muhammad al-Jazuli (1465), a well known Sufi who founded the Jazuli brotherhood;
Abdelaziz al-Tebaa (1508), a student of al-Jazuli;
Abdallah al-Ghazwani (1528), known as Moulay al-Ksour; and
Sidi Abu al-Qasim Al-Suhayli, (1185), also known as Imam al-Suhayli. Until 1867, European Christians were not authorized to enter the city unless they acquired special permission from the sultan; east European Jews were permitted.
20th century In the early 20th century, Marrakesh underwent several years of unrest as Morocco was plagued by anarchy, tribal revolts, the plotting of feudal lords, and European intrigues. After the death in 1900 of the grand vizier
Ba Ahmed, who had been designated regent until the designated sultan
Abd al-Aziz became of age, and the 1906
Algeciras Conference, which limited Moroccan sovereignty, southern aristocrats, including powerful Amazigh tribal leaders of the High Atlas,
pledged their allegiance to the caliph of Marrakesh
Moulay Abd al-Hafid as Sultan of Morocco over his brother
Abd al-Aziz in 1907, which started the
Hafidiya. France used the event as a pretext for sending its troops from
Algeria to the eastern Moroccan town of
Oujda, marking the beginning of the
French conquest of Morocco. After the
Battle of Sidi Bou Othman, which saw the victory of the French Mangin column over the al-Hiba forces in September 1912, the French seized Marrakesh. The conquest was facilitated by the rallying of the Imzwarn tribes and their leaders from the powerful Glaoui family, leading to a massacre of Marrakesh citizens in the resulting turmoil. ,
Pasha of Marrakesh (1912 to 1956)
T'hami El Glaoui, known as "Lord of the Atlas", became Pasha of Marrakesh, a post he held virtually throughout the 44-year duration of the Protectorate (1912–1956). Glaoui dominated the city and became famous for his collaboration with the general residence authorities, culminating in a plot to dethrone Mohammed Ben Youssef (Mohammed V) and replace him with the Sultan's cousin,
Ben Arafa. Glaoui, already known for his amorous adventures and lavish lifestyle, became a symbol of Morocco's colonial order. He could not, however, subdue the rise of nationalist sentiment, nor the hostility of a growing proportion of the inhabitants. Nor could he resist pressure from France, who agreed to terminate its Moroccan Protectorate in 1956 due to the launch of the
Algerian War (1954–1962) immediately following the end of the
war in
Indochina (1946–1954), in which Moroccans had been conscripted to fight in
Vietnam on behalf of the French Army. After two successive exiles to
Corsica and
Madagascar, Mohammed Ben Youssef was allowed to return to Morocco in November 1955, bringing an end to the despotic rule of Glaoui over Marrakesh and the surrounding region. A protocol giving independence to Morocco was then signed on 2 March 1956 between French Foreign Minister Christian Pineau and M’Barek Ben Bakkai. period (after 1912). Since the independence of Morocco, Marrakesh has thrived as a tourist destination. In the 1960s and early 1970s, the city became a trendy "
hippie mecca". It attracted numerous western rock stars and musicians, artists, film directors and actors, models, and fashion divas, leading tourism revenues to double in Morocco between 1965 and 1970.
Yves Saint Laurent,
The Beatles,
The Rolling Stones and
Jean-Paul Getty all spent significant time in the city; Laurent bought a property here and renovated the Majorelle Gardens. Expatriates, especially those from France, have invested heavily in Marrakesh since the 1960s and developed many of the
riads and palaces. Over the following decades, the demographic importance of the historic medina declined, due to much of it being converted from residential housing to commercial properties as well as due to the general expansion of the city beyond its traditional areas. In 1984, about 51% of the city's population lived in the medina, whereas only 22% did in 2004.
United Nations agencies became active in Marrakesh beginning in the 1970s, and the city's international political presence has subsequently grown. In 1985,
UNESCO declared the old town area of Marrakesh a
UNESCO World Heritage Site, raising international awareness of the cultural heritage of the city. In the 1980s,
Patrick Guerand-Hermes purchased the
Ain el Quassimou, built by the family of
Leo Tolstoy. On 15 April 1994, the
Marrakesh Agreement was signed here to establish the
World Trade Organisation, and in March 1997 Marrakesh served as the site of the
World Water Council's first World Water Forum, which was attended by over 500 international participants. In the 21st century, property and real estate development in the city has boomed, with a dramatic increase in new hotels and shopping centres, fuelled by the policies of
Mohammed VI of Morocco, who aims to increase the number of tourists annually visiting Morocco to 20 million by 2020. In 2010, a major gas explosion occurred in the city. On 28 April 2011,
a bomb attack took place in the Jemaa el-Fnaa square, killing 15 people, mainly foreigners. The blast destroyed the nearby Argana Cafe. Police sources arrested three suspects and claimed the chief suspect was loyal to
Al-Qaeda, although
Al-Qaeda in the Islamic Maghreb denied involvement. In November 2016 the city hosted the
2016 United Nations Climate Change Conference. In September 2023, the city was affected by
a deadly earthquake. From October 9 to October 15, 2023, the city hosted the
Annual Meetings of the International Monetary Fund and the World Bank Group. ==Geography==