The Royal Palace of Marrakesh, also known as Dar el-Makhzen, is located at the southern end of the city, occupying most of the eastern section of the present-day Kasbah quarter. The Almohads first built a palace complex on this site in the 12th century, as part of their newly-built kasbah,[47] but it was completely remodeled by the Saadians in the 16th century and the Alaouites after the 17th century.[23][6] Much of its current form has been dated to the 18th century under the reign of Mohammed Ben Abdallah.[48] The Alaouite palace today consists of several grand gardens and courtyards surrounded by various chambers and pavilions.