Large numbers of Moroccan Jews have lived for centuries in the imperial cities of Fez, Marrakesh, Meknes and Rabat. These cities hosted the Sultan (King) at different times in Moroccan history. Sultans maintained palaces in each city for their periodic visits. To assure the security of the Jewish population, mellahs, the walled communities where Jews lived, were generally located next to royal palaces. In 2020, less than a hundred Jews live in each imperial city.