expansion of the palace cut into the general residential areas of Fes el-Jdid. Moulay Rashid also built the vast Kasbah Cherarda north of Fes el-Jdid in order to house his tribal troops. The housing of troops here also liberated new space in Fes el-Jdid itself, including the northwestern area which became the new Moulay Abdallah neighbourhood from the early 18th century onwards. This is where Sultan Moulay Abdallah (ruled between 1729 and 1757) erected a large mosque and royal necropolis for the Alaouite dynasty. Abdallah's successor, Sultan Mohammed ben Abdallah (ruled 1748 and 1757–1790), was responsible, according to some sources, for establishing the New Mechouar (north of the Old Mechouar); though other scholars attribute this to Moulay Hassan a century later. The Alaouite period also saw periods of turmoil and regression. From 1790 to 1792 Sultan Moulay Yazid, largely seen as a cruel leader, forced the entire Jewish community to move from the Mellah to the outlying Kasbah Cherarda on the other side of Fes el-Jdid. The Mellah was occupied by tribal troops allied to him, its main synagogue was replaced by a mosque, and the Jewish cemetery and its contents were moved to a cemetery near Bab Guissa. Moreover, Moulay Yazid permanently reduced the size of the Mellah district by demolishing the old city walls around it and rebuilding them along a much shorter perimeter we see today. It was only after the sultan's death that the chief Muslim qadi (judge) of Fes ordered the Mellah to be restored to the Jewish community. Major expansions and modifications to Fes el-Jdid and to the royal palace continued throughout the 19th century. Under sultan Moulay Abd al-Rahman (ruled 1822–1859) the Bab Bou Jat Mechouar or Grand Mechouar was created to the west of the Moulay Abdallah quarter, providing the palace grounds with another ceremonial entrance to the northwest. This led to the western gate of the Moulay Abdallah quarter, Bab Bou Jat, eventually being closed off. A large garden area on the west side of the palace, the Lalla Mina Gardens, was also established by Moulay Abd al-Rahman, stretching to the old Marinid western walls of the city. To the west of these an even larger walled garden called the Agdal was established by Sultan Moulay Hassan I. Moulay Hassan also connected Fes el-Jdid and Fes el-Bali (the old city) for the first time with a broad corridor of walls, and