The Mellah of Marrakesh was created by decree of the Sultan Abdallah al-Ghalib of the Saadian dynasty in 1558,[2][unreliable source?]
[7] Generally, under the terms of the Pact of Umar, non-Muslims living under Islamic rule, including Jews, were subject to restrictions in their manner of dress.
Similar to sumptuary laws in Europe, it was intended to preserve dress as an identifying marker of one's social class to signal to others the proper courtesies or dignities required as such, however these restrictions, which included not imitating Muslim attire, came to be regarded as humiliating.
In Morocco, the rules were only applied to Jews when they were reintroduced by Mawlay Sulayman in 1815, but despite the formal reintroduction of the restrictions, their enforcement was lax in practice.
In the 18th century William Lempriere wrote that "when they enter the Moorish town, castle, or palace, [Jews] are always compelled to be barefooted", suggesting that the rule was not enforced in the mellah.
Abdalmalik of Morocco reportedly forced the elders of the mellah to remove their slippers in the palace "in accordance with their ancient status of dhimma".