Marrakesh, or Marrakech (Berber: Merrakec, ⵎⴻⵔⵔⴰⴽⴻⵛ; Arabic: مراكش, Murrākuš) (pronounced Marra-kesh), is a major city in the northwest African nation of Morocco. With a population of 794,620 and 1,063,415 in the metropolitan area according to the 2004 census, it is Morocco's fourth largest city after Casablanca, Fes and Rabat, and the capital of the mid-southwestern economic region of Marrakech-Tensift-El Haouz, near the foothills of the snow-capped Atlas Mountains. By road, Marrakesh is located 580 km (360 mi) southwest of Tangier, 327 km (203 mi) southwest of the Moroccan capital of Rabat, 239 km (149 mi) southwest of Casablanca, and 246 km (153 mi) northeast of Agadir.
Marrakesh is the most important of the four former imperial cities in the history of Morocco. Inhabited by Berber farmers from Neolithic times, the city was founded in 1062 by Abu Bakr ibn Umar, chieftain and cousin of Yusuf ibn Tashfin. Led by the Almoravids, many mosques including the Koutoubia Mosque and madrasas (Koranic schools) were built there during the 12th century with Andalusian influence. The red walls of the city, built by Ali ibn Yusuf in 1122-1123, and various buildings constructed during this period have given the city the nickname of the "Red City" or "Ochre City" because of the red sandstone used. 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. After a period of decline, the city was surpassed by Fez, in the early 16th century, Marrakesh again became the capital of the kingdom and reestablished its former glory especially during the reigns of the wealthy Saadian sultans Abu Abdallah al-Qaim and Ahmad al-Mansur who embellished the city with sumptuous palaces such as the El Badi Palace (1578), and restored many ruined monuments. As a centre for sufism, the city became known for its "Seven Saints". In 1912 the French Protectorate in Morocco was established and 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, dominating the city and living a lavish lifestyle. In 2009, Fatima Zahra Mansouri became only the second woman in Morocco's history to be elected mayor of a city.
Mashrabiya or Shanasheel (Arabic: مشربية or شناشيل) is the Arabic term given to a type of projecting oriel window enclosed with carved wood latticework located on the second storey of a building or higher, often lined with stained glass. The mashrabiy (sometimes shanshool or rushan) is an element of traditional Arabic architecture used since the middle ages up to the mid-20th century. It is mostly used on the street side of the building; however, it may also be used internally on sahn side.
Mashrabiyas were mostly used in houses and palaces although sometimes in public buildings such as hospitals, inns, schools and government buildings. They are found mostly in the mashriq – i.e. east of the Arab world, but some types of similar windows are also found in the maghrib (west of the Arab world). They are very prevalent in Iraq, the Levant, Hejaz and Egypt. They are mostly found in urban settings and rarely in rural areas. Basra is often called “the city of Shanasheel”.