When the Almohad ruler Abd al-Mu'min conquered Marrakesh in 1147, he reportedly destroyed many Almoravid monuments (especially mosques). However the new Almohad rulers for a time used the Ksar el-Hajjar and the palace of Ali ibn Yusuf as their official residence.[1][2] The Almohad caliph Ya'qub al-Mansur (ruled 1184-1199) embarked on an ambitious construction project to create a vast new royal district attached to the south side of the city. (Some sources cite his predecessor Abu Ya'qub Yusuf as the first one to found the kasbah,[4][5] but most of the work is usually attributed to al-Mansur.[1][2][6]) This new citadel and extension of the city was known in historical sources as the Kasbah (or Qasaba), as well as Tamurakusht and as-Saliḥa.[6]:320 It was built over the site of an Almoravid garden estate known as as-Saliḥa, of which only the eastern portion remained, and was later replaced by the present-day Mellah.[1]:195[5] The construction of the kasbah was motivated in part by the rapid growth of the city's population and an urgent need for more space within the city.[6] It may also have been motivated by the Almohad caliph's desire to follow the example of other powerful Islamic rulers who built separate palace-cities from which to rule, such as the Umayyad construction of Madinat al-Zahra near Cordoba or the Abbasid construction of Samarra in Iraq.[1] Construction of the Marrakesh kasbah began in 1185 and finished by 1190, though al-Mansur's successors continued to build more palaces within it, totaling twelve by the end of the Almohad period.[1][2][6]