<Ol> <Li> Jump up ^ The High Commission for Planning defines the city of Marrakesh as comprising the municipality of Méchouar - Kasba and the five arrondissements of Annakhil, Gueliz, Marrakech - Médina, Ménara and Sidi Youssef Ben Ali . </Li> </Ol> <Li> Jump up ^ The High Commission for Planning defines the city of Marrakesh as comprising the municipality of Méchouar - Kasba and the five arrondissements of Annakhil, Gueliz, Marrakech - Médina, Ménara and Sidi Youssef Ben Ali . </Li> <P> Marrakesh (/ məˈrækɛʃ / or / ˌmærəˈkɛʃ /; Arabic: مراكش ‎ Murrākuš; Berber: ⴰⵎⵓⵔⴰⴽⵓⵛ Meṛṛakec), also known by the French spelling Marrakech, is a major city of the Kingdom of Morocco . It is the fourth largest city in the country, after Casablanca, Fez and Tangier . It is the capital city of the mid-southwestern region of Marrakesh - Safi . Located to the north of the foothills of the snow - capped Atlas Mountains, Marrakesh is situated 580 km (360 mi) southwest of Tangier, 327 km (203 mi) southwest of the Moroccan capital of Rabat, 239 km (149 mi) south of Casablanca, and 246 km (153 mi) northeast of Agadir . </P> <P> Marrakesh is possibly the most important of Morocco's four former imperial cities . 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 . </P>

What country casablanca and marrakech are located in