The name Marrakech originates from the Amazigh (Berber) words amur (n) kush, which means “Land of God.” It is the third largest city in Morocco, after Casablanca and Fez, and lies near the foothills of the snow-capped Atlas Mountains.
It is a few hours from the foot of the Sahara Desert. Its location and contrasting landscape has made it an enviable destination in Morocco.
Marrakech gave its name to the kingdom of which it was long the capital. It was founded in the mid-11th century by Yūsuf ibn Tāshufīn of the dynasty of the Almoravids, and it served as the Almoravid capital until it fell to the Almohads in 1147. In 1269 Marrakech passed to the control of the Marīnids, whose preferred capital was the northern city of Fès.
Although Marrakech flourished while serving as the capital under the Saʿdīs in the 16th century, the succeeding ʿAlawite rulers resided more often at Fès or Meknès; however, the ʿAlawites continued to use Marrakech as a military post. In 1912 Marrakech was captured by the religious leader Aḥmad al-Ḥībah, who was defeated and driven out by French forces commanded by Col. Charles M.E. Mangin. Under the French protectorate (1912–56), Marrakech was for many years administered by the Glaoui family, the last of whom, Thami al-Glaoui, was the chief instigator of the deposition of Muḥammad V in 1953.