The histories of the Egyptians and Jews have been interconnected since antiquity. In ancient times, Egypt was the premier empire of the world. Since the ancient kingdoms of Judea and Israel were so close to Egypt, it often had a major influence through its trade, diplomacy, and war. Jewish communities have been present in Egypt for thousands of years.
There are, of course, extensive Biblical accounts that detail the Jewish exodus from Egypt. However, Egypt’s modern Jewish community was established by Jews that settled in the country around the Hellenistic era. In particular, Alexandria became home to numerous famous Greek-speaking Jews. Jews in Egypt traditionally spoke Judeo-Arabic, similar to the dialect spoken in Alexandria.
After the Arab conquest of Egypt, Jews were culturally influenced by the new Arab rulers. This group was the “core” of the Egyptian Jewish population, who arrived in Egypt during Hellenistic times, and were eventually Arabized. Many Sephardic Jews settled in Egypt after the Spanish expulsion, and later from the Ottoman Empire, because of economic opportunities. There’s even a small Ashkenazi community in the country that escaped pogroms in the 19th century.
Israel and Egypt currently have a tense relationship, although it was much worse in the early parts of the 20th century. Egypt declared war against Israel shortly after the Jewish state declared independence, using it as a pretense to deport thousands of Jews (who later settled in Israel). In 1956, Egypt issued an official government order that declared all Jews as enemies of the state, and ordered their expulsion from the country. As a result, tens of thousands of more Jews fled the country and also settled in Israel.
In the summer of 1967, the government confiscated Jewish property, an action reminiscent of Nazi Germany. Then, during the Six Day War, Egypt increased its persecution of Jews and jailed Jewish males sixteen years or older.
In 1979, when Israel and Egypt made peace and Egypt finally recognized Israel, official contact was established between the Jewish community in Egypt and Israel. After that, however, the Jewish community was wiped out and no longer remains. It is estimated that only 3 Jews permanently reside in Egypt, all in Cairo.
The current Egyptian policy on the remaining Jewish population, and on Egyptian Jews visiting the country, has been mixed. At times, the government has expressed the desire for religious coexistence. In another case, they banned a yearly festival commemorating Abu Hatzira, a famous rabbi, in 2014. It is clear that progress is still needed for Egyptian and Jewish relations.
Among the Jews of Egypt, there is a notable Karaite community. Karaites make up a small proportion of the Egyptian Jewish population and a tiny proportion of the Jewish population, and most are from Egypt. Karaite Judaism is a distinct form of Judaism that rejects all Talmudic Law, recognizes the Torah, and has different interpretations and distinct ways of celebrating Jewish holidays.
Sources: https://www.rabbinicalassembly.org/sites/default/files/public/halakhah/teshuvot/20012004/49.pdf https://www.jewishvirtuallibrary.org/jews-of-egypt https://www.jewishvirtuallibrary.org/alexandria