His sons fought each other for power and his former 'abid army became the dominant power in the state, effectively ruling behind the throne.[1][2] Meknes lost its status as capital and suffered damage in the 1755 earthquake.[3] The city was neglected and many parts of the enormous imperial kasbah fell into disrepair. The site received only occasional royal attention in the following centuries. Sultan Muhammad ibn Abdallah, who ruled between 1757 and 1790, added the Dar al-Bayda Palace in the Agdal garden to the southeast of the main palace complex, which was later turned into a royal military academy.[16] He also constructed the Er-Roua Mosque in the southern part of the kasbah (not far from the Heri al-Mansur), which is the largest mosque in Meknes.[22][5]:391 The Dar al-Kebira, however, was abandoned and progressively transformed into a residential neighbourhood where the inhabitants constructed their houses within and between the former palace structures of Isma'il's time.[6] In the early 19th century, Sultan Moulay Abd ar-Rahman added a loggia structure in front of Bab al-Mansur which served as a meeting place for ceremonies and the governor's tribunal, though this structure was later removed.[7]