In the 19th century, due to economic transformations and the proliferation of European industrial imports competing with traditional Jewish crafts, there was a major migration of Jews from the rural hinterland to coastal cities.
The Justinian edict of persecution for North Africa, issued after Vandal rule had been overthrown and Mauretania had come under the dominion of the Byzantines (534), was directed against the Jews as well as the Arians, the Donatists, and other dissenters.
[14] Unlike the problems encountered by the Jews during the rule of the Almohads (the Almoravids' successor dynasty), there are not many factual complaints of excesses, coercion, or malice on the part of the authorities toward the Jewish communities.
[13] The Dhimmi status, which called for the payment of jizya (taxes for non-Muslims) in exchange for a certain level of protection for religious minorities, came to an end under the strict militant dynasty of the Almohads, who came into power in 1146.
[16] Maimonides, who was staying in Fez with his father, is said to have written to the communities to comfort and encourage his brethren and fellow believers in this time of oppression[17] In the above-mentioned elegy of Abraham ibn Ezra, which appears to have been written at the commencement of the period of the Almohads, and which is found in a Yemen siddur among the kinot prescribed for the Ninth of Ab, the Moroccan cities Ceuta, Meknes, the Draa River valley, Fez, and Segelmesa are especially emphasized as being exposed to great persecution.
They supported the Kingdom of Granada in Al-Andalus in the 13th and 14th centuries; an attempt to gain a direct foothold on the European side of the Strait of Gibraltar was however defeated at the Battle of Salado in 1340 and finished after the Castilian conquest of Algeciras from the Marinids in 1344.
[25][26][27] In 1438, under pressure from the shurafāʾ, Sultan Abū Muḥammad ʿAbd al-Ḥaqq made Jewish merchants with businesses in the qaysāriyya (the main market of Fes el Bali) abandon them and move to the mellah near Dar al-Makhzen in Fās al-Jadīd.
[30] A hundred years later, in 1492, King Ferdinand II of Aragon and Queen Isabella I of Castile issued the Alhambra Decree - an edict ordering the expulsion of practicing Jews from Spain.
[8][33] However, the influx of refugees also caused overcrowding in the larger cities of Morocco and aroused uneasiness among both the Muslims, who feared an increase in the price of necessities, and the Jews already settled there, who had hitherto barely succeeded in creating a livelihood in handicrafts and petty commerce.
[34] Despite the trials faced by Jews in Morocco, numerous "New Christians" - also referred to as "Marranos" - that still remained in Spain and Portugal following the expulsions endeavored to make their way to North Africa.
[37] In 1508, Portugal had come to occupy parts of Morocco, succeeding in conquering the old seaport town of Safi, which had a large number of Jewish inhabitants and had subsequently become an important commercial center.
[44] When, in 1578, the young king Sebastian with almost his whole army met death, and Portugal saw the end of her glory, in the Battle of Alcazarquivir, the few nobles who remained were taken captive and sold to the Jews in Fez and Morocco.
[47] With their skill in European commerce, arts, and handicrafts, hitherto largely unknown to the Moors, and with their wealth, the megorashim Jews contributed conspicuously to the rise and development of the Alaouite dynasty since its beginning in 1666.
According to Chénier, when Al-Raschid took the city of Marrakech in 1670, at the desire of the inhabitants he caused the Jewish counselor and governor of the ruling prince Abu Bakr, together with the latter and his whole family, to be publicly burned, in order to inspire terror among the Jews.
[54] The Jews, who served as tax-collectors on the whole coast, used to give Ismail a golden riding-outfit as an annual "present"—an inducement to keep them in office—and a hen and a dozen chickens fashioned in gold as a tax payment for the whole Jewish community.
At the beginning of the 17th century Pacheco in the Netherlands; Shumel al-Farrashi at the same place in 1610; after 1675 Joseph Toledani, who, as stated above, concluded peace with Holland; his son Hayyim in England in 1750; a Jew in Denmark.
In 1780 Jacob ben Abraham Benider was sent as minister from Morocco to King George III; in 1794 a Jew named Sumbal and in 1828 Meïr Cohen Macnin were sent as Moroccan ambassadors to the English court.
[8][9][56] In the 18th century, in the period between the Saadi and 'Alawi dynasties, the Jewish community of Oufrane, which predated Islam in Morocco and spoke Tamazight and Arabic, came into contact with a "mad sorcerer" seeking the support of Yazid.
"[73] The persecution of Moroccan Jews was one of the motives for the foundation in 1860 of the Alliance Israélite Universelle (AIU), a French-based organization working for Jewish social and political equality and economic advancement worldwide.
"[80] While the AIU failed to achieve much in increasing Moroccan Jews' political status, it did succeed in giving a significant minority of them modern French-language educations and in initiating them into French culture.
For many centuries, Moroccan Jews and Muslims had shared such customs as polygamy, segregation of the sexes, early ages of female marriage, and a tolerance for men's love of male youths that was in contrast to both Jewish and Islamic scriptural prescriptions.
According to a statistical report of the AIU, for the years 1864–80 no less than 307 Jews were murdered in the city and district of Morocco, which crimes, although brought to the attention of the magistracy upon every occasion, remained unpunished.
Emily Gottreich cites antisemitic "observations" in writings of the British journalist and adventurer Walter Burton Harris and the colonial priest Father Charles de Foucauld that were not exceptional of European Christian views at the time.
[97] In 1912, amid the insurrection that followed the disclosure of the Treaty of Fes, thousands of rebelling Moroccan soldiers entered and pillaged the Mellah of Fez, stopping only after French artillery rounds pounded the Jewish quarter.
[109] Other major external Jewish and Zionist[110] philanthropic organizations, including Œuvre de secours aux enfants (OSE), ORT, and others, implemented a massive aid program for children in the areas of nutrition, health, and education.
Small structures created by private initiatives, especially by the Zionist advocate Samuel-Daniel Levy and financially supported by the international organizations,[110] have included Talmud Torah, Lubavitcher, Ozar Hatorah, Em Habanim, La Maternelle, Casablanca Children's Soup Kitchen, which have contributed to the effort.
Through the early 1950s, Zionist organizations encouraged emigration, particularly in the poorer south of the country, seeing Moroccan Jews as a valuable source of labor for the Jewish State.
[117] It was based out of an office in Casablanca and operated cells in large cities as well as a transit camp along the road to al-Jadida, from which Jewish migrants would depart for Israel via Marseille.
There was a short-lived movement within the Istiqlal Party to unite Muslims and Jews called al-Wifaq (الوفاق), with prominent Jewish figures such as Armand Asoulin, David Azoulay, Marc Sabbagh, Joe O’Hana, and Albert Aflalo.
In late 2021, marking the first anniversary of the re-establishment of diplomatic ties between Morocco and Israel, King Mohammed VI launched an initiative to restore hundreds of historical Jewish sites throughout the country.