Marrakech is located in central Morocco, at the foot of the High Atlas Mountains, approximately 580 km southwest of Rabat (the capital). It sits in the Haouz Plain, a fertile area nourished by centuries of irrigation systems. The city is divided into the old medina, surrounded by walls, and the modern quarters like Gueliz and Hivernage.