The Maghreb or the Berber world or Barbary or Berbery (Arabic: المغرب al-Maɣréb; Berber languages: Tamazɣa or Tamazgha, ⵜⴰⵎⴰⵣⵗⴰ) is a major region of northern Africa that consists primarily of the countries Algeria, Morocco, Tunisia, Libya and Mauritania. It additionally includes the disputed territories of Western Sahara (mostly controlled by Morocco) and the cities of Melilla and Ceuta (both controlled by Spain and claimed by Morocco). As of 2017, the region has a population of over 100 million people.
In historical English and European literature, the region was known as the Barbary Coast or the Barbary States, derived from "Berbers". Sometimes it was referred to as the Land of the Atlas, derived from the Atlas Mountains. In some current Arabic media and literature it is referred to as the "Greater Maghreb" (Arabic: المغرب الكبير, al-Maghrib al-Kabīr). In current Berber language media and literature, the region is known as "Tamazgha" or "Tamazɣa" which correspond to the English words "Barbary" and "Berbery".
The region is usually defined as much or most of northern Africa including a large portion of Africa's Sahara Desert, excluding Egypt. The traditional definition of the region that restricted it to the Atlas Mountains and the coastal plains of Morocco, Algeria, Tunisia, and Libya, was expanded by the inclusion of Mauritania and of the disputed territory of Western Sahara.
During the Al-Andalus era in the Iberian Peninsula (711–1492), the Maghreb's inhabitants, the Muslim Berbers or Maghrebis, were known as "Moors" or as "Afariqah" (Roman Africans). Morocco also transliterates into Arabic as "al-Maghreb" (The Maghreb).
Before the establishment of modern nation states in the region during the 20th century, Maghreb most commonly referred to a smaller area between the Atlas Mountains in the south and the Mediterranean Sea. It often also included eastern Libya, but not modern Mauritania. As recently as the late 19th century it was used to refer to the Western Mediterranean region of coastal North Africa in general, and to Algeria, Morocco and Tunisia in particular.
The region was somewhat unified as an independent political entity during the rule of the Berber kingdom of Numidia, which was followed by the Roman Empire's rule or influence. That was followed by the brief invasion of the Germanic Vandals, the equally brief re-establishment of a weak Roman rule by the Byzantine Empire, the rule of the Islamic Caliphates under the Umayyad Caliphate, the Abbasid Caliphate, and the Fatimid Caliphate. The most enduring rule was that of the local Berber empires of the Almoravid dynasty, Almohad dynasty, Hammadid dynasty, Zirid dynasty, Marinid dynasty, Zayyanid dynasty, and Wattasid dynasty from the 8th to 13th centuries. The Ottoman Turks ruled the region as well.
Mauritania, Morocco, Tunisia, Algeria, and Libya established the Maghreb Union in 1989 to promote cooperation and economic integration in a common market. It was envisioned initially by Muammar Gaddafi as a superstate. The union included Western Sahara implicitly under Morocco's membership, putting Morocco's long cold war with Algeria to a rest. However, this progress was short-lived, and the union is now frozen. Tensions between Algeria and Morocco over Western Sahara re-emerged strongly, reinforced by the unsolved borderline issue between the two countries. These two main conflicts have hindered progress on the union's joint goals and practically made it inactive as a whole. However, the instability in the region and growing cross-border security threats revived the calls for regional cooperation – foreign ministers of the Arab Maghreb Union declared a need for coordinated security policy in May 2015 during the 33rd session of the follow-up committee meeting, which brings back the hope of some form of cooperation.