History of the Jews under Muslim rule
Jewish communities have existed across the Middle East and North Africa since Antiquity. By the time of the Muslim conquests of the 7th century, these ancient communities had been ruled by various empires and included the Babylonian, Persian, Carthaginian, Greek, Roman, Byzantine, Ottoman and Yemenite Jews. Jews under Islamic rule were given the status of dhimmi, along with certain other pre-Islamic religious groups. Though second-class citizens and often persecuted, these non-Muslim groups were nevertheless accorded certain rights and protections as "people of the book". During waves of persecution in Medieval Europe, many Jews found refuge in Muslim lands. Today, Jews residing in Muslim countries have been reduced to a small fraction of their former sizes, with Iran and Turkey being home to the largest remaining Jewish populations. This was due to the widespread persecution, anti-semitism, political instability, curbing of human rights, and a policy by the Israeli government to draw Jews from the Islamic world to Israel. In 2018 the Jewish Agency estimated that around 27,000 Jews live in Arab and Muslim countries. Middle Ages

Muslim conquests

There were, for a long but uncertain period, a significant number of Jews in Arabia. Historians claim that very large numbers of Jews – as many as 80,000 – arrived after the destruction of the First Temple, to join others already long-established in places such as the oasis of Khaybar as well as trading colonies in Medina. Another theory posits that these Jews were refugees from Byzantine persecutions. Arab historians mention some 20 Jewish communities, including two of Kohanim. The Constitution of Medina, written shortly after hijra, addressed some points regarding the civil and religious situation for the Jewish communities living within the city from an Islamic perspective. For example, the constitution stated that the Jews "will profess their religion, and the Muslims theirs", and they "shall be responsible for their expenditure, and the Muslims for theirs". After the Battle of Badr, the Jewish tribe of Banu Qaynuqa breached treaties and agreements with Muhammad. Muhammad regarded this as casus belli and besieged the Banu Qaynuqa. Upon surrender the tribe was expelled. The following year saw the expulsion of the second tribe, the Banu Nadir, accused of planning to kill the prophet Muhammad. The third major Jewish tribe in Medina, Banu Qurayza was eliminated after  betraying the Muslims during the Battle of the Trench. However, there were many Jewish communities in Medina who continued to live in Medina peacefully after these events such as Banu Awf, Banu Harith, Banu Jusham Banu Alfageer, Banu Najjar, Banu Sa'ida, and Banu Shutayba. In year 20 of the Muslim era, or the year 641 CE, Muhammad's successor the Caliph Umar decreed that Jews and Christians should be removed from all but the southern and eastern fringes of Arabia—a decree based on the uttering of the Prophet: "Let there not be two religions in Arabia". The two populations in question were the Jews of the Khaybar oasis in the north and the Christians of Najran. Only the Red Sea port of Jeddah was permitted as a "religious quarantine area" and continued to have a small complement of Jewish merchants. During the Caliphates

During the Middle Ages, Jewish people under Muslim rule experienced tolerance and integration. Some historians refer to this time period as the "Golden Age" for the Jews, as more opportunities became available to them. In the context of day-to-day life, Abdel Fattah Ashour, a professor of medieval history at Cairo University, states that Jewish people found solace under Islamic rule during the Middle Ages. The Muslim rule at times didn't fully enforce the Pact of Umar and the traditional Dhimmi status of Jews; i.e., the Jews sometimes, as in eleventh-century Granada, were not second-class citizens. Author Merlin Swartz referred to this time period as a new era for the Jews, stating that the attitude of tolerance led to Jewish integration into Arab-Islamic society. Social integration allowed Jews to make great advances in new fields, including mathematics, astronomy, philosophy, chemistry and philology, with some even gaining political power under Islamic rule. For example, the vizier of Baghdad entrusted his capital to Jewish bankers, Jews were put in charge of certain parts of maritime and slave trade, and Siraf, the principal port of the caliphate in the 10th century, had a Jewish governor. Increased commercial freedom increased their integration into the Arab marketplace. Leon Poliakov writes that in the early ages of Islam, Jews enjoyed great privileges, and their communities prospered. No laws or social barriers restricted their commercial activities, and exclusive trade and craft guilds like those in Europe did not exist. Jews who moved to Muslim lands found themselves free to engage in any profession, resulting in less stigma than in Europe where such restrictions were still in force. This, coupled with more intense Christian persecution, encouraged many Jews to migrate to areas newly conquered by Muslims and establish communities there. Although Jewish life improved under Islamic rule, an interfaith utopia did not exist. Jews still experienced persecution. Under Islamic Rule, the Pact of Umar was introduced, which protected the Jews but also established them as inferior. Since the 11th century, there have been instances of pogroms against Jews. Examples include the 1066 Granada massacre, the razing of the entire Jewish quarter in the Andalucian city of Granada. In North Africa, there were cases of violence against Jews in the Middle Ages, and in other Arab lands including Egypt, Syria and Yemen. Beginning in the 15th century, the Moroccan Jewish population was confined to segregated quarters known as mellahs. In cities, these were surrounded by walls and a fortified gateway. Rural mellahs, however, were separate villages inhabited solely by Jews. The Almohads, who had taken control of much of Islamic Iberia by 1172, were far more fundamentalist in outlook than the Almoravides, and they treated the dhimmis harshly. Jews and Christians were expelled from Morocco and Islamic Spain. Faced with the choice of either death or conversion, some Jews, such as the family of Maimonides, fled south and east to more tolerant Muslim lands, while others went northward to settle in the growing Christian kingdoms. In 1465, a mob enraged by stories about the behavior of a Jewish vizier killed many of the Jews and the Sultan himself. The community was temporarily converted but soon reverted to Judaism. Historian Mark R. Cohen proposes a comparative approach to understanding Jewish life under Islamic rule, noting that Jews in Islamic lands often experienced less physical violence than Jews under Western Christendom. He posits that Muslims considered Jews less theologically threatening than Christians did, suggesting that the Christians wanted to establish a separate religious identity from Judaism, from which their faith split and diverged. According to him, instances of persecution were occasional, more the exception than the rule, and claims of systemic persecution at the hands of Muslim rulers are myths created to bolster political propaganda. The situation where Jews in the Muslim world both enjoyed cultural and economic prosperity at times, but were widely persecuted there at other times, was summarised by G. E. Von Grunebaum:

It would not be difficult to put together the names of a very sizable number of Jewish subjects or citizens of the Islamic area who have attained to high rank, to power, to great financial influence, to significant and recognized intellectual attainment; and the same could be done for Christians. But it would again not be difficult to compile a lengthy list of persecutions, arbitrary confiscations, attempted forced conversions, or pogroms. Recently, historian Mohammed Ibraheem Ahmed has posited a political-contingent view of Muslim-Jewish relations. He extends Cohen's point of there being neither an incessant utopia, nor total conflict between Muslims and Jews. He argues that Muslim-Jewish relations are hooked on the political situation of the time, and that is why it often changes between periods of conflict and coexistence. In the 7th century, the new Muslim rulers institute the kharaj land tax, which led to mass migration of Babylonian Jews from the countryside to cities like Baghdad. This in turn led to greater wealth and international influence, as well as a more cosmopolitan outlook from Jewish thinkers such as Saadiah Gaon, who now deeply engaged with  Western philosophy for the first time. When the Abbasid Caliphate and the city of Baghdad declined in the 10th century, many Babylonian Jews migrated to the Mediterranean region, contributing to the spread of Babylonian Jewish customs throughout the Jewish world. Seljuk Empire (1077-1307) and early Ottoman rule

Early Modern Period

Ottoman Empire

The Ottoman Empire served as a refuge for Jewish refugees from the Spanish Empire, especially after the fall of Muslim Spain in 1492 and Edict of Expulsion. This continued through the Roman Catholic Inquisition, as secret Jews and forced converts continued to flee Spain. The Maghreb from North Africa similarly found refuge among the Ottomans, as large Arabian cities created their own restrictive Jewish quarters (Mellahs). In 1834, in Safed, Ottoman Syria, local Muslim Arabs carried out a massacre of the Jewish population known as the Safed Plunder. In 1840, the Jews of Damascus were falsely accused of having murdered a Christian monk and his Muslim servant and of having used their blood to bake Passover bread. A Jewish barber was tortured until he "confessed"; two other Jews who were arrested died under torture, while a third converted to Islam to save his life. Throughout the 1860s, the Jews of Libya were subjected to what Gilbert calls punitive taxation. In 1864, around 500 Jews were killed in Marrakech and Fez in Morocco. In 1869, 18 Jews were killed in Tunis, and an Arab mob on Jerba Island looted and burned Jewish homes, stores, and synagogues. In 1875, 20 Jews were killed by a mob in Demnat, Morocco; elsewhere in Morocco, Jews were attacked and killed in the streets in broad daylight. In 1897, synagogues were ransacked and Jews were murdered in Tripolitania. Kurdistan

Jews lived in Kurdistan for thousands of years, before the final and mass migration in 1951–1952 to Israel. The Jews lived under the Ottoman Empire and under the Persian Empire for many years and following World War I, they lived mainly in Iraq, Iran and Turkey, some lived in Syria. Jews lived in many Kurdish urban centers such as Aqra, Dohuk, Arbil, Zakho, Sulaimaniya, Amadia, in Southern Kurdistan, in Saqiz, Bana and Ushno, in Eastern Kurdistan, in Jezira, Nisebin, Mardin and Diyarbakır in Turkey and in Qamishle in North-Western Syria. Jews lived as well in hundreds of villages in the rural and tribal area of Kurdistan, usually one or two families in a village, where they worked as weavers of traditional Kurdish clothing or as tenants of the agha, the landlord or head of the village. Persia

In 1656, all Jews were expelled from Isfahan and forced to convert to Islam because of a common belief that their Jewishness was impure. However, as it became known that the converts continued to practice Judaism in secret and because the treasury suffered from the loss of jizya collected from the Jews, in 1661 they were allowed to revert to Judaism, although they were still required to wear a distinctive patch on their clothing. In 1839, in the eastern Persian city of Meshed, a mob burst into the Jewish Quarter, burned the synagogue, and destroyed the Torah scrolls. The Jews themselves were violently forced to convert, narrowly avoiding complete massacre. There was another massacre in Barfurush in 1867. In 1839, the Allahdad incident, the Jews of Mashhad, Iran, now known as the Mashhadi Jews, were coerced into converting to Islam. In the middle of the 19th century, J. J. Benjamin wrote of Persian Jews: "…they are obliged to live in a separate part of town…; for they are considered as unclean creatures…  Under the pretext of their being unclean, they are treated with the greatest severity and should they enter a street, inhabited by Mussulmans, they are pelted by the boys and mobs with stones and dirt…  For the same reason, they are prohibited to go out when it rains; for it is said the rain would wash dirt off them, which would sully the feet of the Mussulmans…  If a Jew is recognized as such in the streets, he is subjected to the greatest insults. The passers-by spit in his face, and sometimes beat him… unmercifully…  If a Jew enters a shop for anything, he is forbidden to inspect the goods… Should his hand incautiously touch the goods, he must take them at any price the seller chooses to ask for them... Sometimes the Persians intrude into the dwellings of the Jews and take possession of whatever please them. Should the owner make the least opposition in defense of his property, he incurs the danger of atoning for it with his life... If... a Jew shows himself in the street during the three days of the Katel (Muharram)…, he is sure to be murdered." Bukhara
A number of groups of Persian Jews have split off since ancient times, to the extent that they are now recognized as separate communities, such as the Bukharian Jews and Mountain Jews. Zaydi Yemen

Under the Zaydi rule, discriminatory laws became more severe against the Yemenite Jews, which culminated in their eventual exile, in what later became known as the Exile of Mawza. They were considered to be impure, and therefore forbidden to touch a Muslim or a Muslim's food. They were obligated to humble themselves before a Muslim, to walk to the left side, and greet him first. They could not build houses higher than a Muslim's or ride a camel or horse, and when riding on a mule or a donkey, they had to sit sideways. Upon entering the Muslim quarter a Jew had to take off his foot-gear and walk barefoot. If attacked with stones or fists by Islamic youth, a Jew was not allowed to defend himself. In such situations he had the option of fleeing or seeking intervention by a merciful Muslim passerby. Islamic Spain

Islamic Spain featured both moments of strong coexistence between Muslims and Jews under Islamic rule, and periods of contention. A clear example drawn upon by Ahmed is the case of Samuel b. Naghrela and Joseph b. Naghrela. Whilst the former rose to the status of Grand Vizier, supporting Talmudic schools in Iberia and even declaring separation from the Babylonian Gaonate, the latter was humiliated, defeated and killed for the supposed threat that he posed as a Jew. Ahmed writes: 
'Regarding Samuel’s case, the Jewish community was a thriving minority in Granada, and this enabled a religio-social mobility in which a Jewish rabbi and merchant could become the most politically powerful figure in the land. Once Samuel was in that position, the Jewish community was able to further thrive. The subsequent breakdown in the entire Muslim-Jewish fabric was triggered by the breakdown in a political relationship that formed during a period of coexistence. It is telling to note that the breakdown was prompted purely by a hypothetical political threat, rather than an actual one. It is therefore clear that historic Muslim-Jewish relations are contingent upon an acceptable political situation between Muslims and Jews, and that when this is reached, relations are generally sound. Once this breaks down, however, there is a complete breakdown between Muslims and Jews at large.' Post-colonial era

Arab League

By the mid-1970s the vast majority of Jews had left, fled or had been expelled from Arab and Muslim-majority  countries, moving primarily to Israel, France and the United States. The reasons for the exodus are varied and disputed. In 1945, there were between 758,000 and 866,000 Jews living in communities throughout the Arab world. Today, there are fewer than 8,000. In some Arab states, such as Libya, which once had a Jewish population of around 3 percent (similar proportion as that of the United States today), the Jewish community no longer exists; in other Arab countries, only a few hundred Jews remain. The largest communities of Jews in Muslim countries exist in the non-Arab countries of Iran (9,500) and Turkey (14,500); both, however, are much smaller than they historically have been. Among Arab countries, the largest Jewish community now exists in Morocco with about 2,000 Jews and in Tunisia with about 1,000. Imperial Iran and Islamic Republic
Judaism is the second-oldest religion still existing in Iran after Zoroastrianism. By various estimates, between 8,000 and 10,000 Jews remain in Iran, mostly in Tehran and Hamedan. About one-third of the some 120,000-150,000 Iranian Jews in the mid-20th century fled the country during the 1950s, as a consequence of political instability. Most of the remaining 80,000-100,000 Jews fled during and following the Islamic Revolution of 1979. Today, the largest groups of Persian Jews are found in Israel (236,000-360,000 in 2014, including second-generation Israelis) and the United States (45,000, especially in the Los Angeles area, home to a large concentration of expatriate Iranians). There are also smaller communities in Western Europe. See also
Musta'arbi Jews
Bukharan Jews
Maghrebi Jews
Mizrahi Jews
Persian Jews
Sephardi Jews
African Jews
Islam and Judaism
Golden age of Jewish culture in Spain
Jewish exodus from Arab and Muslim countries
History of the Jews in the Arabian Peninsula

References

Notes

Further reading
 
 
 

 

A Golden Age

Islam and Judaism
Jews in Muslim lands
Sephardi Jews topics
Jewish political status
History of the Jews in the Middle East
Jewish exodus from Arab and Muslim countries