The enclosed and partly protected position of the Mellah fairly accurately represents the historically ambivalent position of Moroccan Jews. Arriving for the most part with compatriot Muslim refugees from Spain and Portugal, they were never fully accepted into the nation’s life. Yet nor were they quite rejected as in other Arab countries. Inside the Mellah, they were under the direct protection of the sultan (or the local caïd) and maintained their own laws and governors.
Whether the creation of a ghetto ensured the actual need for one is debatable. Certainly, it greatly benefited the reigning sultan, who could depend on Jewish loyalties and also manipulate the international trade and finance that they came to dominate in the nineteenth century. But despite their value to the sultan, even the richest Jews led extremely circumscribed lives. In Fez before the French Protectorate, no Jew was allowed to ride or even to wear shoes outside the Mellah, and they were severely restricted in their travels elsewhere.