Maghrebi Jews (in Hebrew Maghrebim מַגּרֶבִּים or מַאגרֶבִּים) are Jews who had traditionally lived in the Maghreb region of North Africa (al-Maghrib, Arabic for "the west") under Arab rule during the Middle Ages. Established Jewish communities had existed in North Africa long before the arrival of Sephardi Jews, expelled from Portugal and Spain. The oldest Jewish communities were present during Roman times and possibly as early as within Punic colonies of the Ancient Carthage period. Maghrebi Jews largely mixed with the newly arrived Sephardic Jews, beginning from the 13th century until the 16th century, eventually being overwhelmed by Sephardics and embracing the Sephardic Jewish identity in most cases.
The mixed Maghrebi-Sephardic Jewish communities collapsed in the mid-20th century as part of the Jewish exodus from Arab countries, moving mostly to Israel and France and merging into the Israeli Jewish and French Jewish communities. Today, descendants of Maghrebi-Sephardic Jews in Israel have largely embraced the renovated Israeli Jewish identity and in many cases intermix with Ashkenazi and Mizrahi Jewish communities there. Some of the Maghrebi-Sephardic Jews (literally Western Jews) also consider themselves as part of Mizrahi Jewish community (literally Eastern, or Babylonian Jews), even though there is no direct link between the two communities. They have similar histories of Arabic-speaking background and a parallel exodus from Arab and Muslim countries: the Mizrahim left nations of the Middle East, and the Maghrebi-Sephardics left nations of North Africa in the mid-20th century.
Some Jewish settlements in North Africa date back to pre-Roman times, possibly correlating with the late Punic settlements in the area.
Earlier mentions of Jewish presence go back to Cyrenaica , Greek colony of eastern Libya and home to an early Jewish community. Notable Cyrenaic Jews of that era includes Simon of Cyrene mentioned in the New Testament. After Jewish defeat in the First Jewish-Roman War in 70 CE, Roman General Titus deported many Jews to Mauretania, which roughly corresponds to the modern Maghreb and many of them settled in what is now Tunisia. These settlers engaged in agriculture, cattle-raising, and trade. They were divided into clans, or tribes, governed by their respective heads, and had to pay the Romans a capitation tax of 2 shekels.
During the Kitos War, Jews must have suffered losses, they continued to thrive in parts of North Africa that were under the Late Roman Empire. After 429 CE, with the fairly tolerant Vandals, the Jewish residents of the North African province increased and prospered to such a degree that African Church councils decided to enact restrictive laws against them. Berber lands east of Aleandria were relatively tolerant and were historically very welcoming for Christians and Jews during the Roman Empire notably. After the overthrow of the Vandals by Belisarius in 534 CE over the Roman era, Justinian I issued his edict of persecution, in which the Jews were classed with the Arians and heathens.
A community settled in Djerba island off the coast of southern Tunisia during the Roman period. Mainly composed of Cohanim , they notably built the Ghriba synagogue with stones coming directly from Jerusalem. 'La Ghriba' is still to this day annually visited by a lot of North African Jews.
Under Muslim domination Jewish communities developed in important urban centers such as Kairouan and coastal cities of Tunisia , in Tlemcen, Béjaïa and Algiers in the Central Maghreb as far as in the extreme Maghreb (modern Morocco) especially Fes and in the Atlas Mountains among the Berber populations. The relationships between Muslims and Jews in the Maghreb were relatively good thanks to the Al Andalus peaceful era, until the Almohades which persecuted non-Muslims to a large extent during their early reign. Later Jews were relatively well treated by the Berber Muslim dynasties namely Merinids, Zianides and Zirides.
In the seventh century, the Jewish population was augmented by Iberian Jewish immigrants, who, fleeing from the persecutions of the Visigothic king Sisebut and his successors, escaped to the Maghreb and settled in the local Byzantine Empire. The much greater immigration of Sephardic Jews took place between 1391 and 1492, by the Alhambra decree edict of expulsion, and persecution in Spain and Portugal.
Fez and Algiers respectively in Morocco and Algeria became important Sephardic rabbinical centers, well until the early 20th century, when most Jewish populations settled in Israel, France, Canada and Latin America.