According to tradition the Ibadis, after their overthrow at Tiaret by the Fatimids during the 10th century, took refuge in the country to the south-west of Ouargla. and founded an independent state there. In 1012, owing to further persecutions, they fled to their present location, where they long remained invulnerable. After the capture of Laghouat by France, the Mozabites concluded a convention with them in 1853, whereby they accepted to pay an annual contribution of 1,800 francs in return for their independence. In November 1882, the M'zab country was definitely annexed to French Algeria. Ghardaïa is the capital of the confederacy, followed in importance by Beni Isguen, the chief commercial centre. Since the establishment of French control, Beni Isguen has become the depot for the sale of European goods. The Mozabite engineers built a system of irrigation works that made the oases much more fertile than they used to be.
It is not canonically agreed when Jews first came to Southern Algeria, but one theory suggests they were sent there by the Ibadite leadership in the 14th Century from Tunisia, as part of a merchant trade route. They continued as a merchant community, with subsequent waves of immigration during times of anti-Semitism across the Sahara, Europe, and the Middle East. In 1881, one year before the French annex of the Mzab, there were estimated 3,000 Mozabite Jews, out of 30,000 general Algerian Jews. By 1921, this number would grow to 74,000, a result of a spike in anti-Semitism in the later 1800s and early 1900s, though the Mozabite Jewish community would remain small, with most Jewish migrants settling in the North. In 1882, when the French military annexed the Mzab, they began an administrative rule that was separate from their Northern departments. Unlike their Northern Jewish counterparts, many of the Mozabite Berber Jews in Southern Algeria were classified by the French under the “indigenous code”. Given the diversity of the Mzab Jewish population, the French administration incorporated some “culturally Saharan”, but ethnically non-indigenous Jews into the North, and gave them citizenship under the Crémieux Decree of 1870. This perceived distinction by the French between Berber and non-Berber Jews of the Mzab was not a reflection of “technical precision”, but rather “a manufactured form of legal difference.” While the French sought to assimilate the Northern Jewry as French citizens, they recognized religious rule of the Mozabite Jewish population, while keeping them separate under indigenous law, which meant severely limited political and social power. With anti-Semitism on the rise in the late 1800s, French colonial powers sought to decrease Jewish commerce in the South, and prevent further Jewish collaboration with Muslim communities. They continued to distance the Mozabite Jews from other Algerian Jewish affairs, keeping Mozabite, or “Mosaic” laws for civil matters, and French indigenous laws for public and criminal matters. It was not until 1961, with the French National Assembly Law 61-805 that the Mozabite Jews were granted “common law civil status” and French citizenship.