Marrakesh is possibly the most important of Morocco's four former imperial cities (cities that were built by Moroccan Berber empires). The region has been inhabited by Berber farmers since Neolithic times, but the actual city was founded in 1062 by Abu Bakr ibn Umar, chieftain and cousin of Almoravid king Yusuf ibn Tashfin. In the 12th century, the Almoravids built many madrasas (Koranic schools) and mosques in Marrakesh that bear Andalusian influences. The red walls of the city, built by Ali ibn Yusuf in 1122–1123, and various buildings constructed in red sandstone during this period, have given the city the nickname of the "Red City" or "Ochre City". Marrakesh grew rapidly and established itself as a cultural, religious, and trading centre for the Maghreb and sub-Saharan Africa; Jemaa el-Fnaa is the busiest square in Africa.
A hot semi-arid climate (Köppen:
BSh) predominates at Marrakesh. Average temperatures range from 12 °C
(54 °F) in the winter to 32–45 °C (90–113 °F) in the summer.[45] The relatively wet winter and dry summer precipitation pattern of Marrakesh mirrors precipitation patterns found in Mediterranean climates.
However, the city receives less rain than is typically found in a
Mediterranean climate, resulting in a semi-arid climate classification.
Between 1961 and 1990 the city averaged 281.3 millimetres (11.1 in) of
precipitation annually.[45]
Barrows says of the climate, "The region of Marrakesh is frequently
described as desert in character, but, to one familiar with the southwestern parts of the United States,
the locality does not suggest the desert, but rather an area of
seasonal rainfall, where moisture moves underground rather than by
surface streams, and where low brush takes the place of the forests of
more heavily watered regions. The location of Marrakesh on the north
side of the Atlas,
rather than the south, forbids its from being described as a desert
city, but it remains the northern focus of the Saharan lines of
communication, and its history, its types of dwellers, and its commerce
and arts, are all related to the great south Atlas spaces that reach
further into the Sahara desert."[46]