The Kasbah of Marrakesh is a large walled district in the southern part of the medina of Marrakesh, Morocco, which historically served as the citadel (kasbah) and royal palace complex of the city. A large part of the district is still occupied by the official royal palace, the Dar al-Makhzen. The Dar al-Makhzen serves as the residence of the King of Morocco when he visits the city.