The beginnings of the Jewish community in Moroccoare the subject ofmany legends; some say that Jews arrived after the destruction of the First Temple of Solomon whilst others have reported that they came overland from Yemen to found a kingdom in Morocco's eastern Saharan oases. It is generally agreed, however, that Jews arrived with Phoenician traders hundreds of years before the Christian era. The two peoples, Berber and Jew, subsequently lived together in some of the coastal settlements that are today known as Tangier, Rabat and Essaouira and the Jews were clearly part of the Roman cities that developed here in the first century, for traces of Jewish life can be found in the Roman ruins at Volubilis, the excavated town near Meknes and the most Western settlement of the Roman Empire. Many of them moved into Morocco by migrating westward along the Mediterranean coast from the large Jewish centre in Carthage (Tunisia). Other Jews moved inland from Cyrenaica (Libya), converted several Berber tribes to Judaism’s belief in one, unique god and established settlements in the foothills of the Rif and Atlas mountains and Saharan oases of Algeria and Morocco. Some of these Jews did not recognise the authority of the Talmud, as evidenced by the writings of religious leaders in Sijilmassa, near today's desert oasis town of Rissani. Tumuli believed to be of Jewish origin existed in the area along the Draâ Valley, the name Draâ (dark, or elbow) is said to derive from when Jew and Berber lived “elbow to elbow” in perfect harmony. As early as Roman times, Moroccan Jews had begun to travel inland to trade with groups of nomadic Berbers, most of who inhabited remote areas of the Atlas Mountains and the Sahara, living side by side with Berbers, forging both economic and cultural ties. When those Umayyad Arabs expelled from Babylon swept west across North Africa, Jews and Berbers in Morocco fought them together. The legendary Hebrew Queen (or Priestess or Seer) Al Kahinat (“La Kahena” - the Cohen in Spanish) is reputed to have led a tribe of 7th century Jewish-Berbers in a Berber resistance in Algeria and Morocco to slow down the Umayyad dynasty’s' westward movement under Hassan Ibn al Nu’man through a scorched earth policy and by evacuating villages. Though the Muslims eventually defeated Al Kahinat - some called her “the African Joan of Arc” - to convert her subjects to Islam, many Berber communities maintained their Judaism. By the year 732 A.D., the Umayyads had established an empire extending to Morocco and Spain. The first substantial Jewish settlements developed in 586 B.C., when Nebuchadnezzar, King of Assyria, destroyed Jerusalem and took hundreds of Jews captive in Babylonia, as mentioned in the Lamentations of Jeremiah. The community grew as an outpost of Palestine, maintaining close ties with the Jewish homeland even as North Africa and most other vassal states in the Roman Empire finally rose in rebellion against Roman Emperors Marcus Ulpius Nerva Traianus (Trajan) (53-117 A.D.) and his successor Publius Aelius Traianus Hadrianus (Hadrian) 76-138 A.D. When they and the Moorish (Berbers from the Roman Province of Mauretania Tingitana) tribes were not rebelling, Jews lived in relative tranquility, being allowed to maintain their status as a distinct nation throughout the ‘Pax Romana’. However, in the 4th century A.D., after the first Christian Roman Emperor Flaverius Valerius Constantinus - Constantine - influenced by his Christian mother Helena - made Christianity the law of the land, the Romans introduced laws specifically directed against the Jews. Byzantine Emperor Flavius Petrus Sabbatus Iustianus (Justinian the Great) instituted an even further despotic ecclesiastical policy after his General Belisarius had destroyed the Vandals in Spain (‘Vandalusia’ = Andalusia, the El Andalus of the Moors) in 534 A.D., whereby Jews were held in contempt until the Moslem conquest of the lands in the 7th century when the Byzantine Roman hold on Morocco had become extremely weakened.
Jews long since native to Morocco were called "Toshavim" or “residents”, whereas those Sephardim Jews expelled from Andalusia during the Inquisition of the Middle Ages (in 1492 when Columbus was to sail the ocean blue) were known as "M’gorachim" or “exiles”, these latter importing their refined cultural way of living to provide eminent scholars, Talmudists, and jurists who settled primarily on the northern coast. At first the deeply conservative Toshavim, practising the religion of their ancestors of 2000 years previous, would not allow any mingling with these Sephardic outcasts, considering them almost agnostics. The Toshavim remained Arab-speaking while the M’gorachim remained primarily speakers of Castilian Spanish. As they did throughout the Islamic world, Muslims in Morocco were to make a clear distinction between "Believers" and "Infidels" whereby they developed a third category for Jews and Christians, "People of the Book," who hadn’t yet accepted the teachings of the Prophet Mohammed. Jews in Islamic societies became dhimmis, very much second-class citizens, who were allowed to practice their religion but did not have equal rights under law. In the 11th century Muslim leader Al Mawardi solidified twelve laws (the Charter of Umar) that ruled Jewish life in Islamic nations – they couldn’t touch the Koran, speak of the Prophet demeaningly, touch Muslim women nor do anything that would turn a Muslim against his faith. They also forced Jewish dhimmis to wear a yellow sash, prohibited them from building synagogues taller than a mosque; of owning or riding dromedaries and horses (but not donkeys); were not allowed to drink wine in public nor to perform religious rituals in public; were banned from bearing arms and testifying against a Muslim (which made life even more difficult when they were forced out of their homes or shops and were forced to pay the basic tribute, together with a head tax (djezya) and a property tax (kharaj). Muslims forced urban Moroccan Jews to live in ghettos called Mellahs, a name derived from the Arabic word for salt. Fes has the first Jewish Quarter in Morocco. Because it was built on an old salt mine, this and all subsequently constructed Moroccan Jewish Quarters were called Mellahs, or, another version, because Muslim rulers often forced Jews to salt the heads of executed prisoners before being placed on stakes for public display. These Mellahs were crowded, often filthy, poverty-stricken areas criss-crossed by narrow Escheresque corridors and dark, uninviting passageways. As a result of this enforced segregation the Jews educated their own, leading to a high literacy rate, much higher than that of the Muslim community. Some Jews were able to use their intellectual abilities to excel in business, further isolating themselves from the rest of Muslim society and fermenting jealousies. When most Moroccan Jews welcomed the French Declaration of the Moroccan Protectorate in 1912, frustrated Muslims reacted by massacring Jews in the Fes Mellah. General Lyautey who, through a dahir (royal decree) promulgated on November 17, 1917, gave the Moroccan flag the shape and colours with which we are now familiar - he added a mini tricolour on the upper left corner to indicate who were the actual rulers of the country at the time. Prior to this period, the Moroccan flag sported not the five-pointed star (pentagram), but the Star of David as it became known among the Ashkenazi Jews (the hexagram known in Arabic as Khatam Suleiman and in Judaism as the Seal of Solomon, as both Jews and Muslims sought to associate themselves with the legacy of the wise king Solomon (Shlomo, in Hebrew, which, as in Arabic, is associated with the term shalom, or peace), son of the other biblical figure, King David. Morocco’s Semitic heritage, which it shares with Jews, was thus acknowledged on the most visible symbol of the nation, until the French colonialists thought differently. Interestingly, it was the Alaouite monarch, Moulay Suleiman (popularly known as Moulay Slimane in Morocco) who used the Seal of Solomon on the newly minted bronze coins in the late 18th century to add to the standard coin metals in the Islamic world--gold and silver--and, at the same time, protect the new money with the magical powers of his ancient namesake.
Jews became Moroccan citizens under the French Protectorate, though they were not given political equality. A fierce independence rebellion broke out in 1947 on the heels of the failed Vichy French and successful Allied occupations of North Africa. Just prior to WWII, there were some 50 communities of around 225,000 Jews; post-WWII and the establishment of the State of Israel led many Jews to emigrate. As Morocco’s new Muslim government became friendlier with the Arab League, the Jewish position grew more uncertain; those Jews trying to escape from Morocco were captured by government troops and were jailed. In 1961 King Hassan II gave the Jews the right to emigrate, and a substantial percentage did. Today there are several thousand Jews in Morocco, most of who live in Casablanca. There are pockets of Jews in cities like Fes, Rabat, Safi (known as Little Jerusalem) and Marrakech and a continued Berber-Jewish presence remains in small villages like Inezgane, now a suburb of Agadir. Contemporary Moroccan Judaism is a blend of Oriental, Berber, Arab, Spanish customs, resulting in a variety of practices that combine rabbinical teachings with a devotion to spiritualism unfamiliar to most Western Jews.