The history of the Jews in Egypt goes back to ancient times. Egyptian Jews or Jewish Egyptians refer to the Jewish community in Egypt who mainly consisted of Egyptian Arabic-speaking Rabbanites and Karaites. Though Egypt had its own community of Egyptian Jews, after the Jewish expulsion from Spain more Sephardi and Karaite Jews began to migrate to Egypt, and then their numbers increased significantly with the growth of trading prospects after the opening of the Suez Canal in 1869. As a result, Jews from many territories of the Ottoman Empire as well as Italy and Greece started to settle in the main cities of Egypt, where they thrived (see Mutammasirun). The Ashkenazi community, mainly confined to Cairo's Darb al-Barabira quarter, began to arrive in the aftermath of the waves of pogroms that hit Europe in the latter part of the 19th century.

The Jewish population peaked in Egypt at somewhere between 75,000 and 80,000 in 1948. In the aftermath of the 1948 Palestine War, the 1954 Lavon Affair, and the 1956 Suez War, Jews and European groups like the French and British emigrated; much of their property was also confiscated (see 20th century departures of foreign nationals from Egypt).

, the president of Cairo's Jewish community said that there were six Jews in Cairo, all women over age 65, and twelve Jews in Alexandria. , there were at least five known Jews in Cairo and as of 2017, twelve were still reported in Alexandria. In December 2022, it was reported that only three Egyptian Jews were living in Cairo.

Ancient Egypt

The Hebrew Bible describes a long period of time during which the Israelites (the ancient Semitic-speaking people from whom Jews originate* "The people of the Kingdom of Israel and the ethnic and religious group known as the Jewish people that descended from them have been subjected to a number of forced migrations in their history"

Israelite origins and kingdom: "The first act in the long drama of Jewish history is the age of the Israelites"

) settled in ancient Egypt, were enslaved, and were ultimately liberated by Moses, who led them out of Egypt to Canaan. This founding myth of the Israelites—known as the Exodus—is considered to be inaccurate or ahistorical by a majority of scholars. At the same time, most scholars also hold that the Exodus probably has some sort of historical basis, and that a small group of Egyptian origins may have merged with the early Israelites, who were predominantly indigenous to Canaan and begin appearing in the historical record by around 1200 BCE. In the Elephantine papyri and ostraca (c. 500 – 300 BCE), caches of legal documents and letters written in Aramaic amply document the lives of a community of Jewish soldiers stationed there as part of a frontier garrison in Egypt for the Achaemenid Empire.

Established at Elephantine in about 650 BCE during Manasseh's reign, these soldiers assisted the Twenty-sixth Dynasty pharaoh Psamtik I of the Nile Delta in his campaigns against the Twenty-fifth Dynasty pharaoh Tantamani of Napata. Their religious system shows strong traces of Babylonian religion, something which suggests to certain scholars that the community was of mixed Judahite and Samarian origins,Albin van Hoonacker, Une Communité Judéo-Araméenne à Éléphantine, en Egypte, aux vi et v siècles avant J.-C, London 1915 cited, Arnold J. Toynbee, A Study of History, vol.5, (1939) 1964 p125 n.1 and they maintained their own temple, functioning alongside that of the local deity Khnum. The documents cover the period 495 to 399 BCE.

According to the Hebrew Bible, a large number of Judeans took refuge in Egypt after the destruction of the Kingdom of Judah in 586 BCE, and the subsequent assassination of the Jewish governor, Gedaliah. (, ) On hearing of the appointment, the Jewish population that fled to Moab, Ammon, Edom and other countries returned to Judah. () However, before long Gedaliah was assassinated, and the population that was left in the land and those that had returned ran away to Egypt for safety. (, ) The numbers that made their way to Egypt are subject to debate. In Egypt, they settled in Migdol, Tahpanhes, Noph, and Pathros. ()

Ptolemaic and Roman periods

Further waves of Jewish immigrants settled in Egypt during the Ptolemaic dynasty, especially around Alexandria. Thus, their history in this period centers almost completely on Alexandria, though daughter communities rose up in places like the present Kafr ed-Dawar, and Jews served in the administration as custodians of the river. As early as the third century BCE, there was a widespread diaspora of Jews in many Egyptian towns and cities. In Josephus's history, it is claimed that, after Ptolemy I Soter took Judea, he led some 120,000 Jewish captives to Egypt from the areas of Judea, Jerusalem, Samaria, and Mount Gerizim. With them, many other Jews, attracted by the fertile soil and Ptolemy's liberality, emigrated there of their own accord. An inscription recording a Jewish dedication of a synagogue to Ptolemy III and Berenice was discovered in the 19th century near Alexandria.

Josephus also claims that, soon after, these 120,000 captives were freed from bondage by Philadelphus.Josephus, Antiquities of the Jews, in The Works of Josephus, Complete and Unabridged, New Updated Edition (Translated by William Whiston, A.M.; Peabody Massachusetts:Hendrickson Publishers, 1987; Fifth Printing:Jan.1991 Bk. 12, chapters. 1, 2, pp. 308-309 (Bk. 12: verses 7, 9, 11)

The history of the Alexandrian Jews dates from the foundation of the city by Alexander the Great, 332 BCE, at which they were present. They were numerous from the very outset, forming a notable portion of the city's population under Alexander's successors. The Ptolemies assigned them a separate section, two of the five districts of the city, to enable them to keep their laws pure of indigenous cultic influences. The Alexandrian Jews enjoyed a greater degree of political independence than elsewhere. While the Jewish population elsewhere throughout the later Roman Empire frequently formed private societies for religious purposes, or organized corporations of ethnic groups like the Egyptian and Phoenician merchants in the large commercial centers, those of Alexandria constituted an independent political community, side by side with that of the other ethnic groups. Strabo reported that the Jews of Alexandria had their own ethnarch, who managed community affairs and legal matters similarly to a head of state.

The Hellenistic Jewish community of Alexandria translated the Old Testament into Greek. This translation is called the Septuagint. The translation of the Septuagint itself began in the 3rd century BCE and was completed by 132 BCE,Life after death: a history of the afterlife in the religions of the West (2004), Anchor Bible Reference Library, Alan F. Segal, p.363"[...] die griechische Bibelübersetzung, die einem innerjüdischen Bedürfnis entsprang [...] [von den] Rabbinern zuerst gerühmt (..) Später jedoch, als manche ungenaue Übertragung des hebräischen Textes in der Septuaginta und Übersetzungsfehler die Grundlage für hellenistische Irrlehren abgaben, lehnte man die Septuaginta ab." Verband der Deutschen Juden (Hrsg.), neu hrsg. von Walter Homolka, Walter Jacob, Tovia Ben Chorin: Die Lehren des Judentums nach den Quellen; München, Knesebeck, 1999, Bd.3, S. 43ff initially in Alexandria, but in time elsewhere as well. It became the source for the Old Latin, Slavonic, Syriac, Old Armenian, Old Georgian, and Coptic versions of the Christian Old Testament.Ernst Würthwein, The Text of the Old Testament, trans. Errol F. Rhodes, Grand Rapids, Mich.: Wm. Eerdmans, 1995. The Jews of Alexandria celebrated the translation with an annual festival on the island of Pharos, where the Lighthouse of Alexandria stood, and where the translation was said to have taken place.

During the period of Roman occupation, there is evidence that at Oxyrhynchus (now Behneseh), on the west side of the Nile, there was a Jewish community of some importance. Many of the Jews there may have become Christians, though they retained their Biblical names (e.g., "David" and "Elizabeth," who appear in litigation concerning an inheritance). Another example was Jacob, son of Achilles (c. 300 CE), who worked as a beadle in a local Egyptian temple. Philo of Alexandria describes an isolated Jewish monastic community known as the Therapeutae, who lived near Lake Mareotis.

The Roman suppression of the Diaspora Revolt (115–117) led to the near-total expulsion and annihilation of Jews from Egypt and nearby Cyrenaica. The Jewish revolt, which is said to have begun in Cyrene and spread to Egypt, was largely motivated by the Zealots, aggravation after the failed Great Revolt and destruction of the Second Temple, and anger at discriminatory laws. Jewish communities are thought to have rebelled due to messianic expectations, hoping for the ingathering of the exiles and the reconstruction of the Temple. A festival celebrating the victory over the Jews continued to be observed eighty years later in Oxyrhynchus. It was not until the third century that Jewish communities were able to re-establish themselves in Egypt, although they never regained their former level of influence.

Late Roman and Byzantine periods By the late third century, there is substantial evidence of established Jewish communities in Egypt. A papyrus from Oxyrhynchus, dated to 291 CE, confirms the existence of an active synagogue and identifies one of its officials as having come from Palestine. This period likely saw an increase in immigration from Syria Palaestina, as indicated by the rising number of inscriptions, letters, legal documents, liturgical poetry, and magical texts in Hebrew and Aramaic from the fourth and fifth centuries.

The greatest blow Alexandrian Jews received was during the Byzantine Empire rule and the rise of a new state religion: Christianity. There was an expulsion of a large amount of Jews from Alexandria (the so-called "Alexandria Expulsion") in 414 or 415 CE by Saint Cyril, following a number of controversies, including threats from Cyril and supposedly (according to Christian historian Socrates Scholasticus) a Jewish-led massacre in response. Later violence took on a decidedly antisemitic context with calls for ethnic cleansing. Before that time, state/religious-sanctioned claims of a Jewish pariah were not common. In The History of the Decline and Fall of the Roman Empire, Edward Gibbon describes the Alexandria pogrom:

Without any legal sentence, without any royal mandate, the patriarch (Saint Cyril), at the dawn of day, led a seditious multitude to the attack of the synagogues. Unarmed and unprepared, the Jews were incapable of resistance; their houses of prayer were leveled with the ground, and the episcopal warrior, after rewarding his troops with the plunder of their goods, expelled from the city the remnant of the unbelieving nation.

Some authors estimate that around 100,000 Jews were expelled from the city.http://www.research-projects.uzh.ch/p498.htm , Cyril of Alexandria, Against Julian: Critical edition of books 1-10, page 503 The expulsion then continued in the nearby regions of Egypt and Palestine followed by a forced Christianization of the Jews.

Arab rule (641 to 1250)