This article needs additional citations for verification. (October 2007) (Learn how and when to remove this template message)
A mellah (Arabic: ملاح and Hebrew: מלאח, the Arabic meaning "salt spring" or "salt marsh" which was the area of the first Jewish settlement in Fez) is a walled Jewish quarter of a city in Morocco, analogous to the European ghetto. Jewish population were confined to mellahs in Morocco beginning from the 15th century and especially since the early 19th century. It first was seen as family Benyamina living privilege and a protection against the Arabs' attacks in the region, but with the growing of the population, it then became a poor and miserable place. With the colonisation and the arrival of the Europeans at the end of the 19th century and the beginning of the 20th century, the Mellah opened and gave new economical and social possibilities to the Moroccan Jews. These spaces allowed Jewish individuals to develop the identity of the “Moroccan rabbinate, the sociology of the mellah synagogue, lay community leadership, and the historic role of the Sephardic heritage in Morocco.” 
In cities, a mellah was surrounded by a wall with a fortified gateway. Usually, the Jewish quarter was situated near the royal palace or the residence of the governor, in order to protect its inhabitants from recurring riots since its inhabitants played a vital role in the local economy. In contrast, rural mellahs were separate villages inhabited solely by the Jews. Not all cities in Morocco had mellahs. In many of these cities, there were primarily Jewish neighborhoods, but they didn’t come with the safety benefits and protections as a mellah.
The first official mellah was established in the city of Fez in 1438. In the first half of the 14th century, the Marinids founded, alongside Fez, the town of Hims, which was initially allocated to the archers and the Christian militia. In 1438 the Jews were driven from the old part of Fez to Hims, which had been built on a site known as al-Mallah, "the saline area". Ultimately, the term came to designate Jewish quarters in other Moroccan cities. Initially, there was nothing derogatory about this term: some documents employ the expression "mellah of the Muslims", and the Jewish quarter contained large and beautiful dwellings which were favored residences for "the agents and ambassadors of foreign princes". Later on, however, popular etymology explained the word mellah as a "salted, cursed ground" or a place where the Jews "salted the heads of decapitated rebels”, highlighting the outcast connotations attached to this word.
The mellah of Fez was not always successful in protecting its dwellers. On May 14, 1465, its inhabitants were nearly all killed by the rebels who overthrew the Merinid dynasty. That attack sparked a wave of violence against the Jews all over Morocco. The immediate cause of the anti-Jewish violence was the appointment of a Jew to the post of vizier.
For a long time, the mellah of Fez remained the only one, and only in the second half of the 16th century (around 1557) the term mellah appears in Marrakesh, with the settlement there of Jewish population from the Atlas and from the city of Aghmat (some 30 km east of Marrakesh), which had an ancient Jewish community. A Frenchman, who was held captive in Morocco from 1670 to 1681, wrote: "In Fez and in Morocco [that is, Marrakesh], the Jews are separated from the inhabitants, having their own quarters set apart, surrounded by walls of which the gates are guarded by men appointed by the King ... In the other towns, they are intermingled with the Moors." In 1791, a European traveller described the Marrakesh mellah: "It has two large gates, which are regularly shut every evening about nine o'clock, after which time no person whatever is permitted to enter or go out... till... the following morning. The Jews have a market of their own...". Only in 1682 the third mellah was founded in the town of Meknes, the new capital of sultan Moulay Ismail.
At the beginning of the 19th century, around 1807, sultan Sulayman forced Jews to move to mellahs in the towns of the coastal region, in Rabat, Salé, Mogador, and Tetouan. The new Jewish quarters were called mellahs everywhere except Tetouan, where the Spanish word judería was used. In Salé, the new Jewish quarter was a long avenue with a total of 200 houses, 20 shops and trading booths, two kilns and two mills. In 1865, the mellah of Mogador, having become over-populated, was permitted to extend. The mellah in Rabat was established in 1808 by Sultan Mawlay Sulaiman; this separated the Jewish and Muslim people who had lived together in a shared area of the city.
At the end of the century and in the first decades of the twentieth century, affluent Jews started to move to the new neighborhoods (Villes nouvelles) planned along European urban schemes, leaving in the mellahs only the elderly and the poorest families.
20th century onwards
Since the establishment of the State of Israel, in 1948, almost all Moroccan Jews have emigrated to the new Jewish state, some fleeing persecution and some encouraged by the Jewish Agency. As a result, nowadays mellahs are only inhabited by Muslims, the few remaining Jews have moved to modern quarters of Moroccan towns. A large part of them has become historical places to visit while in Morocco.
The appearance of a mellah in a Persian Gulf port, in the account of a journey to China purportedly by a "Jacob of Ancona" and supposed to be made in 1271, that was published by David Selbourne in 1997 as The City of Light, was identified as a clear anachronism in the critical reaction to the book that judged it a hoax.
- Stillman, Norman (1979). The Jews of Arab Lands: A History and Source Book. Philadelphia: Jewish Publication Society of America. ISBN 0-8276-0370-3.
- Zafrani, H. "Mallah", Encyclopaedia of Islam Online, eds. P.J. Bearman, Th. Bianquis, C.E. Bosworth, E. van Donzel and W.P. Heinrichs. Brill Academic Publishers
- Houtsma, M. Th. (editor) (1987) E.J. Brill's First Encyclopaedia of Islam, 1913–1936, Volume 5, New York: E.J. Brill. p.460. ISBN 9004082654
- Encyclopedia of the Jewish Diaspora: Origins, Experiences, and Culture, Volume 1, p. 306, refers to Bernard Lewis 1987.
- Le Mellah dafina.net
- Deshen, Shlomo. The Mellah Society. Chicago Studies in the History of Judaism, 1989.
- Colin, Georges S. “Mellāḥ.” Encyclopaedia of Islam, First Edition (1913-1936)], April 24, 2012.
- Houtsma, M. Th. E.J. Brill’s First Encyclopaedia of Islam, 1913-1936. Vol. 5. BRILL, 1993.
- "The Jewish Community of Fez, Morocco". The Museum of the Jewish People at Beit Hatfutsot.
- Carvajal, Doreen (9 December 1997). "Marco Polo: Is a Rivalry Just Fiction?". The New York Times. Retrieved 16 July 2008.