Introduction

Over the course of history, North Africa has experienced a series of influential cultural and demographic events due to its strategic position located at the crossroads of three continental regions (Europe, Middle East, and the rest of the African continent), resulting in a complex and varied genetic structure in current populations. These migrations introduced genetic components from the neighboring regions, which are now detected in the genomes of present-day North Africans1,2,3,4,5,6,7,8,9.

Ancient artifacts provide evidence of early hominin presence in North Africa dating back to ~ 2.4 Mya10, while the earliest human bones to be directly dated appeared 300 Kya11. Although numerous fossils have been discovered in North Africa, Taforalt in Morocco (15,100–13,900 cal bp) is the oldest site for which genetic data is available, with human remains from the Iberomaurusian period in the Epipalaeolithic7. Additional Early, Middle and Late Neolithic genomes have also been retrieved from different sites in Morocco6,8.

The process of Neolithization in North Africa was introduced by more than one migration wave. In the Early Neolithic, a first migration of European Neolithic farmers introduced farming and cultural knowledge6,8,12,13,14. Genetic analyses, however, revealed that gene flow was unidirectional from autochthonous populations to newcomers8. Unlike this first migration, during the Middle Neolithic people migrated from the Levant8,15,16 admixed with local populations from North Africa, and introduced a new ancestry, resulting in a heterogeneous landscape by the Late Neolithic. Nevertheless, low levels of genetic diversity and small effective population sizes, likely induced by periods of isolation, may have led to the Maghrebi genetic component that is present today8.

The Imazighen (singular Amazigh, also known by the misnomer of Berbers17,18), are likely to be the descendants of the autochthonous inhabitants of North Africa, who inhabited the region prior to the demographic movements beginning in the Iron Age ~ 3000 years ago18,19. At that time, languages of Afro-Asiatic language family may have already been spoken in the region, with little influence from non-African immigrants19. However, significant changes occurred as diverse human groups gradually arrived in the region. The series of historical arrivals began with the influx of Mediterranean-based populations, such as the Phoenicians (~ 900 BCE), Ionians (~ 700 BCE) and Romans (146 BCE)19. However, the Arab conquest, beginning in the seventh century, had a profound and lasting cultural impact by introducing the Arabic language and Islam, which plays an important role in the cultural landscape of the region19. Despite the fact that Arabization implied a cultural and linguistic assimilation of many autochthonous populations19, a wide variety of Amazigh languages that characterize the different groups are still preserved in the region20. Besides Arabization, later population contacts such as the Ottoman and European colonial powers also had an influence in the region19.

Previous genetic studies using from classical markers to genome-wide data1,2,3,4,6,7,8,21,22,23,24,25,26 demonstrated that North Africa diverges from the rest of the African continent, and more closely resembles out-of-Africa (OOA) populations. Most inhabitants of North Africa carry a mix of four genetic ancestral components, including autochthonous components such as the Maghrebi component1. Initial studies suggested that the Maghrebi component could have been introduced in a back-to-Africa movement, more than 12,000 years ago, although an in situ origin cannot be discarded1,27,28,29,30. The comparison of contemporary genomes and ancient modern human samples from the region supported the presence of the local ancestral component, present in the Epipalaeolithic samples from Taforalt7. However, the impact of the Neolithic in North Africa reduced the proportion of this autochthonous component, although it did not erase it2,8. Genetic studies have also demonstrated the genetic impact of the Arabic expansion and the trans-Saharan slave trade in current North Africans2,3,31, as well as the genetic heterogeneity of North Africa, with different degrees of correlation between cultural background, geographic location, and genetics3,5,32.

However, the lower number of genetic studies performed in North Africa compared to other continental territories plus the bias on the sampling in this vast geographic area might have prevented a clear genetic inference of its population history. The limited number of samples analyzed, in addition to the geographically and culturally distant populations under study might have biased some of the conclusions on its past demography. Most of these studies1,