
Thehistory of North Africa is typically divided into its prehistory, the classical period, the arrival and spread of Islam, the colonial era, and finally the post-independence period, in which the current nations were formed. The region has been influenced by a wide range of cultures. The development ofsea travel firmly integrated North Africa into the Mediterranean world, especially during theclassical period. In the 1st millennium AD, theSahara became a major trade zone ascamel caravans brought goods and people from sub-Saharan Africa. The region also has a small but strategic land connection to theMiddle East, which has also played a key role in its history.[citation needed]

North Africa is a relatively thin strip of land between theSahara desert and theMediterranean, stretching fromMoroccanAtlantic coast toEgypt. The region has no set definition, and varies from source to source. Generally included are, from west to east,Morocco,Algeria,Tunisia,Libya andEgypt.[1] The area located at the south of the desert is asteppe, a semi-arid region, called theSahel. It is the ecoclimatic andbiogeographic zone oftransition in Africa between the Sahara desert to the north and theSudanian Savanna to the south. The Sudanian Savanna is a broad belt oftropical savanna that spans theAfrican continent, from the Atlantic Ocean coast in theWest Sudanian savanna to theEthiopian Highlands in theEast Sudanian savanna.[citation needed]
In 15,000 BP, theWest African Monsoon transformed the landscape ofAfrica and began theGreen Sahara period; greater rainfall during the summer season resulted in the growth of humid conditions (e.g.,lakes,wetlands) and the savanna (e.g.,grassland,shrubland) inNorth Africa.[2] Between 5500 BP and 4000 BP, the Green Sahara period ended.[2]
The earliest known humans lived inNorth Africa around 260,000 BC.[3] Through most of theStone Age theclimate in the region was very different from today, the Sahara being far more moist andsavanna like. Home toherds of largemammals, this area could support a largehunter-gatherer population and theAterian culture that developed was one of the most advancedpaleolithic societies.[citation needed]
In theMesolithic period,Capsian culture dominated the central part of North Africa withNeolithic farmers becoming predominant by 6000 BC. Over this period, the Sahara region was steadily drying, creating a barrier between North Africa and the rest ofAfrica.[citation needed]
In 10,000 BP,engraved andpainted CentralSaharan rock art began to be created, spanning theBubaline Period,Kel Essuf Period,Round Head Period,Pastoral Period, Caballine Period, and Cameline Period.[4]
Archaeological evidence has attested that population settlements occurred in Nubia as early as the LatePleistocene era and from the 5th millennium BC onwards, whereas there is "no or scanty evidence" of human presence in the Egyptian Nile Valley during these periods, which may be due to problems in site preservation.[5]
TheNile Valley on the eastern edge of North Africa is one of the richestagricultural areas in the world. The desiccation of the Sahara is believed to have increased the population density in the Nile Valley and largecities developed. Eventually,ancient Egypt unified in one of the world's firstcivilizations.[citation needed]



The expanse of theLibyan Desert cut Egypt off from the rest of North Africa. Egyptianboats, while well suited to the Nile, were not usable in the openMediterranean Sea. Moreover, the Egyptian merchant had far more prosperous destinations onCrete,Cyprus, and theLevant.
Greeks fromEurope and thePhoenicians fromAsia also settled along the coast of Northern Africa. Both societies drew their prosperity from the sea and from ocean-born trade. They found only limited trading opportunities with the native inhabitants, and instead turned tocolonization. The Greek trade was based mainly in theAegean,Adriatic,Black, andRed Seas and they only established major cities inCyrenaica, directly to the south of Greece. In 332 BC,Alexander the Great conqueredEgypt and for the next three centuries it was ruled by the GreekPtolemaic dynasty.
ThePhoenicians developed an even larger presence in North Africa with colonies fromTripoli to theAtlantic. One of the most important Phoenician cities wasCarthage, which grew into one of the greatest powers in the region. At the height of its power,Carthage controlled the Western Mediterranean and most of North Africa outside of Egypt. However,Rome, Carthage's major rival to the north, defeated it in a series of wars known as thePunic Wars, resulting in Carthage's destruction in 146 BC and the annexation of its empire by the Romans. In 30 BC,Roman EmperorOctavian conquered Egypt, officially annexing it to the Empire and, for the first time, unifying the North African coast under a single ruler.

The Carthaginian power had penetrated deep into the Sahara ensuring the quiescence of thenomadic tribes in the region. TheRoman Empire was more confined to the coast, yet routinely expropriatedBerber land for Roman farmers. They thus faced a constant threat from the south. A network offorts andwalls were established on the southern frontier, eventually securing the region well enough for localgarrisons to control it without broader Imperial support.
When the Roman Empire began to collapse, North Africa was spared much of the disruption until theVandal invasion of 429 AD. The Vandals ruled in North Africa until the territories were regained byJustinian of the Eastern Empire in the 6th century. Egypt was never invaded by the Vandals because there was a thousand-mile buffer of desert and because the Eastern Roman Empire was better defended.
During the rule of the Romans, Vandals, Byzantines, Carthaginians and the Ottomans the Kabyle people managed to maintain their independence.[7][8][9][10] Still, after the Arab conquest of North Africa, the Kabyle people maintained the possession of their mountains.[11][12]

In the 7th century CE, theinception of Islam facilitated the unification of nomadic Arab tribes by bond of a common faith, preventing their historical internecine fighting alongreligious divisions.[14]: 47–48 The main motivation for expansion was to spread Islam and convert pagans, with emphasis on the toleration of people practising othermonotheistic orAbrahamic religions.[15]: 56 Led by ingenious generals, the nascentRashidun Caliphate centred inMedina won a series of crucial victories against the established powers in the Middle East, expanding in all directions, with theByzantine's financial and military exhaustion fromprevious wars in the region inducing them to evacuate from Syria in 636 CE after only two years of conflict.[16]: 47–48
With the regional Byzantine presence and power shattered, the Muslim armies turned towards Egypt and by 642 CE had conquered all of Egypt following thesiege of Alexandria, generally facing little resistance by subjects odious of Roman rule.[17]: 48 The subsequent rapidIslamization of Egypt has been attributed to people's dismay at the disruption caused by theChalcedonian schism.[18]: 59 Marching up the Nile, the Muslims launched a campaign against theMakurians but were repelled inbattle, in a rare defeat owing to skilled Nubian archery and natural defences.
Their attention would then turn west to the Maghreb where theExarchate of Africa had declared independence from Constantinople underGregory the Patrician. The Muslims effortlessly annexedIfriqiya (modern-dayLibya) and in 647 CE defeated and killed Gregory and his army decisively inbattle. Not wishing to annex the territory, they carried out raids across the decapitated state, and the populations, seeing they were at the Muslims' mercy, appealed to the general to pay a substantial tribute which was accepted.[19]: 232 The Rashidun armies returned to Egypt and would again invadeMakuria in 652 CE only to again be repelled inbattle, leading them bothto sign a treaty stipulating peace, which would dictate the relations between Egypt and Nubia for over seven centuries.[20]: 81–82
Further expansion into North Africa waited another twenty years, due to theFirst Fitna, which led to the establishment of theUmayyad Caliphate, who moved the capital of the Muslim empire toDamascus, and its rule over the newly-conquered territories. In 670 CE,Uqba ibn Nafi al-Fihiri invaded what is nowTunisia in an attempt to take the region from theByzantine Empire, but was only partially successful. He founded the town ofKairouan but was replaced by Abul-Muhajir Dinar in 674 CE. Abul-Muhajir successfully advanced into what is now easternAlgeria incorporating theKingdom of Altava andAwraba tribe both ruled byKusaila into the Islamic sphere of influence.[21]: 29–30
In 681 CE Uqba was given command of the Arab forces again and advanced westward again in 682 CE, holding Kusaya as a hostage. He advanced to the Atlantic Ocean in the west and penetrated theDraa River Valley and the Sus region in what is nowMorocco. However, Kusaila escaped during the campaign and attacked Uqba on his return and killed him nearBiskra in what is now Algeria. After Uqba's death, the Arab armies retreated from Kairouan, which Kusaila took as his capital. He ruled there until he was defeated by an Arab army underZuhair ibn Kays. This caused an epiphany among the Berber that this conflict was not just against the Byzantine's.[22]: 236 Zuhair himself was killed in 688 CE while fighting against the Byzantine Empire which had reoccupied Cyrenaica while he was busy inTunisia.[21]: 30
In 693 CE,CaliphAbd al-Malik ibn Marwan sent an army of 40,000 men, commanded byHasan ibn al-Nu'man, into Cyrenaica andTripolitania to remove the Byzantine threat to the Umayyads advance in North Africa. They met no resistance until they reached Tunisia where they capturedCarthage and defeated the Byzantines andBerbers aroundBizerte.[21]: 30–31
Soon afterwards,al-Nu'man's forces came into conflict with theKingdom of the Aures andJrāwa tribe both under the leadership of their queen,Al-Kahina. The Berbers defeated al-Nu'man in two engagements, the first on the riverNini and the second nearGabis, upon which al-Nu'man's forces retreated to Cyrenaica to wait for reinforcements. For five years this secured for Kahina the position of the uncontested ruler of the Maghreb until Arab reinforcements arrived in 703 CE and al-Nu'man advanced into what is now Tunisia, again meeting Al-Kahina near Gabis. This time he was successful and Al-Kahina retreated to Tubna where her forces were defeated and she was killed.[21]: 31
Al-Nu'man next recapturedCarthage from the Byzantines, who had retaken it when he retreated from Tunisia. He founded the city ofTunis nearby and used it as the base for theUmmayad navy in theMediterranean Sea. The Byzantines were forced to abandon theMaghreb and retreat to the islands of the Mediterranean Sea. However, in 705 CE he was replaced byMusa bin Nusair, a protégé of then governor of Egypt, Abdul-Aziz ibn Marwan. Nusair attacked what is nowMorocco, capturedTangier, and advanced to theSus river and theTafilalt oasis in a three-year campaign.[21]: 31–32
The Umayyads were overthrown in the east by theAbbasid Revolution, which replaced it with theAbbasid Caliphate. The Abbasids imposed their authority on Egypt and central North Africa as far west as Ifriqiya, but the regions further west of here remained beyond their control. These western regions were ruled by the local Berber tribes or other local dynasties, often adhering to eitherSufri orIbadiKharijism.[21]: 41
The Fatimid Caliphate was established byAbu Abdallah al-Shi'i with the helpKutama Berbers fromLittle Kabylia after they conquered Ifriqiya from the Aghlabids.[23][24] In 909Abdallah al-Mahdi was enthroned as the first Fatimid Caliph in Ifriqiya. They went on to extend direct control or suzerainty over Egypt, varying extents of the Maghreb, Sicily, the Levant, and theHijaz. In 969 the Fatimid armyconquered Egypt and in 973 the Fatimid court was reinstalled in the new capital ofCairo, while government of the Maghreb was entrusted to theZirids. After a long period of decline, the Fatimid Caliphate was eventually abolished bySalah ad-Din in 1171 and replaced in Egypt by theAyyubid dynasty.[24]
The Zirid Dynasty was a family ofSanhaja Berbers that were originally from the Kabyle mountains.[25] Initially on behalf of the Fatimids, they ruled the eastern and central Maghreb but encountered more resistance to the west from localZenata factions and theUmayyads of Cordoba.[21]: 67, 74–75 Sometime between 1041 and 1051 they renounced the suzerainty of the Fatimid caliphs in Cairo. The Fatimid retaliation came in the form of the invasions of theBanu Hilal andBanu Sulaym into the Maghreb.[21]: 68–70
The Hammadids came to power after declaring their independence from the Zirids in 1015.[21]: 69 They managed to conquer land in all of the Maghreb region, capturing and possessing significant territories such as: Algiers, Bougie, Tripoli, Sfax, Susa, Fez, Ouargla and Sijilmasa.[26][27][28] South of Tunisia, they also possessed a number of oasis that were the termini of trans-Saharan trade routes.[29]
In the 11th century, Berbers of the Sahara began ajihad to reform Islam in North Africa to impose what they saw as a more rigorously orthodoxMaliki version of Islam. They were initially inspired by the teachings ofIbn Yasin and nominally recognized the suzerainty of the Abbasid Caliphs.[21]: 76–80 This movement created an empire which, at its greatest extent, encompassedAl-Andalus (southern and easternIberia at the time) and roughly all of present-day Morocco andWestern Sahara.[30] This movement seems to have assisted the southern penetration of Africa, one that was continued by later groups. In addition, the Almoravids are traditionally believed to have attacked and brought about the destruction of theWest AfricanGhana Empire.[31] However, this interpretation has been questioned. Conrad and Fisher (1982) argued that the notion of any Almoravid military conquest at its core is merely perpetuated folklore, derived from a misinterpretation or naive reliance on Arabic sources[32] while Dierke Lange agrees but argues that this doesn't preclude Almoravid political agitation, claiming that Ghana's demise owed much to the latter.[33]
The Almohads were another religious and political movement that arose among the Berbers of the western Maghreb during the 12th century. They promoted a new fundamentalist and unorthodox/reformist version of Islam which recognizedIbn Tumart as a messianic figure, theMahdi.[30]: 246 After Ibn Tumart's death, the movement's political leadership passed on to 'Abd al-Mu'min, who overthrew the Almoravids and conquered the entire Maghreb and the remaining territories of Al-Andalus. Their empire disintegrated in the 13th century and was succeeded by three major states in North Africa: theMarinids in the western Maghreb, theZayyanids in the central Maghreb, and theHafsids in the eastern Maghreb (Ifriqiya).[34]
In November 1184, the governor ofMallorca andAlmoravid pretender Ali Ibn Ishaq invaded Almohad-Tunisia.[35]The Tunisia campaign would be the last major accomplishment of his life, scoring many military victories againstYaqub al-Mansur, among them,Constantine,Algiers, and Beija were seized. Ishaq's eventual death in 1187 led to the Almohads reoccupying Tunisia the following year.
The situation engendered to the Caliph by Banu invasion was twofold:Yaqub al- Mansur was involved militarily in Al-Andalus consistently throughout his reign, seeking to avenge his fatherAbu Yaqub Yusuf, murdered byAfonso I of Portugal. This gifted Caliph Yaqub Mansur atwo front war which consumed his entire rule. After the empire restored in Tunisia, deeming the threat neutralized, Yaqub Mansur launched two campaigns in Portugal in 1190 and 1191.

In 1203, Abdallah Ibn Ishaq toppled the governor ofMallorca, Tashfin, who was an installed Almohad puppet. Fueled by the quelling of Almohad control in Mallorca, the Banu once again invaded Tunisia.[36]
Abdallah Ishaq's army harassed the caliph with raids and skirmishes, and key cities like Algiers and Constantine again fell. Under Yahya Ibn Ishaq, Banu forces reached as far asCyrenaica. They weren't driven out, tediously to the Caliphs, till 1226. Ishaq reoccupied Tunisia and much of the Maghreb for a third time in 1238 with little to no struggle. The financial and resource-strain placed on the Almohad Empire from the Banu conflict, accompanied by Iberian endeavors, to be a contributing factor to the Empire's decline.The Almohade Empire dissolved in 1269.

The Hafsids were a Masmuda Berber dynasty ruling Ifriqiya (modern Tunisia) from 1229 to 1574. Their territories stretched from east of modern Algeria to west of modern Libya during their zenith.
The dynasty was named after Muhammad bin Abu Hafs, a Berber from the Masmuda tribe of Morocco. He was appointed governor of Ifriqiya (present day Tunisia) by Muhammad an-Nasir, Caliph of the Almohad empire between 1198 and 1213. The Banu Hafs were a powerful group amongst the Almohads; their ancestor was Omar Abu Hafs al-Hentati, a member of the council of ten and a close companion of Ibn Tumart. His original name was "Fesga Oumzal", which later changed to "Abu Hafs Omar ibn Yahya al-Hentati" (also known as "Omar Inti") since it was a tradition of Ibn Tumart to rename his close companions once they had adhered to his religious teachings.The Hafsids as governors on behalf of the Almohads faced constant threats from Banu Ghaniya who were descendants of Almoravid princes which the Almohads had defeated and replaced as a ruling dynasty.
Hafsids were Ifriqiya governors of Almohads until 1229, when they declared independence. After the split of the Hafsids from the Almohads under Abu Zakariya (1229–1249), Abu Zakariya organised the administration in Ifriqiya (the Roman province of Africa in modern Maghreb; today's Tunisia, eastern Algeria and western Libya) and built Tunis up as the economic and cultural centre of the empire. At the same time, many Muslims fromAl-Andalus fleeing the Spanish Reconquista of Castile, Aragon, and Portugal were absorbed. He also conqueredTlemcen in 1242 and took Abdalwadids as his vassal. His successor Muhammad I al-Mustansir (1249–1277) took the title of Caliph.
In the 14th century the empire underwent a temporary decline. Although the Hafsids succeeded for a time in subjugating theKingdom of Tlemcen of theAbdalwadids, between 1347 and 1357 they were twice conquered by theMerinids of Morocco. The Abdalwadids however could not defeat the Bedouin; ultimately, the Hafsids were able to regain their empire. During the same period plague epidemics caused a considerable fall in population, further weakening the empire.Under the Hafsids, commerce with Christian Europe grew significantly, however piracy against Christian shipping grew as well, particularly during the rule of Abd al-Aziz II (1394–1434). The profits were used for a great building programme and to support art and culture. However, piracy also provoked retaliation from Aragon and Venice, which several times attacked Tunisian coastal cities. Under Utman (1435–1488) the Hafsids reached their zenith, as the caravan trade through the Sahara and with Egypt was developed, as well as sea trade with Venice and Aragon. The Bedouins and the cities of the empire became largely independent, leaving the Hafsids in control of only Tunis and Constantine.
In the 16th century the Hafsids became increasingly caught up in the power struggle between Spain and the Ottoman Empire-supported Corsairs. Ottomans conquered Tunis in 1534 and held one year. Due to Ottoman threat, Hafsids were vassal of Spain after 1535. Ottomans again conquered Tunis in 1569 and held it for 4 years. Don Juan of Austria recaptured it in 1573. The latter conquered Tunis in 1574 and the Hafsids accepted becoming a Spanish vassal state to offset the Ottoman threat. Muhammad IV, the last Caliph of the Hafsids was brought to Constantinople and was subsequently executed due to his collaboration with Spain and the desire of the Ottoman Sultan to take the title of Caliph as he now controlled Mecca and Medina. The Hafsid lineage survived the Ottoman massacre by a branch of the family being taken to the Canary Island of Tenerife by the Spanish.
After theMiddle Ages, Northern Africa was loosely under the control of theOttoman Empire, except for theKabyle people and Moroccan region ruled bySaadi Sultanate.[37][38][39] Ottoman rule was centered on the cities of Algiers, Tunis, and Tripoli.
During the 18th and 19th century, North Africa wascolonized byFrance, theUnited Kingdom,Spain andItaly. During the 1950s and 1960s, and into the 1970s, all of the North African states gained independence from their colonial European rulers, except for a few small Spanish colonies on the far northern tip ofMorocco, and parts of the Sahara region, which went from Spanish to Moroccan rule.

In modern times theSuez Canal inEgypt (constructed in 1869) has caused a great deal of controversy. TheConvention of Constantinople in 1888 declared the canal a neutral zone under the protection of the British, after British troops had moved in to protect it in 1882. Under theAnglo-Egyptian Treaty of 1936, the United Kingdom insisted on retaining control over the canal. In 1951 Egypt repudiated the treaty, and by 1954 Great Britain had agreed to pull out.
After theUnited Kingdom and theUnited States withdrew their pledge to support the construction of theAswan Dam, PresidentGamal Abdel Nasser nationalized the canal, which led Britain,France andIsrael to invade in the week-longSuez War. As a result of damage and sunken ships, the canal was closed until April 1957, after it had been cleaned up withUN assistance. A United Nations force (UNEF) was established to maintain the neutrality of the canal and theSinai Peninsula.
In the 1960's, theEuropean Economic Community (later becoming theEuropean Union), developed an economic and sociopolitical relationship with theMaghreb states.[40] The treaty of Rome demonstrated this by inviting Morocco and Tunisia to create an agreement between these countries and the EEC. This cemented Maghreb nations trading with Europe and the EEC to overall influence their growth. Trading between Europe and Maghreb gradually increased, leading to the creation of theGlobal Mediterranean Policy, in 1972. This policy lasted until 1992. However, there was little financial benefit that this policy created for both parties.
The growth of the EEC called for more restrictive measures for trading with Maghreb due to security concerns. European strife also contributed to lack of trading between regions, with theBerlin wall falling and overall a necessity to draw their focus away from Maghreb. Maghreb had to deal with their own internal conflicts as well, as the 2nd Gulf War in 1991 caused sociopolitical turmoil without the states. While trading still occurs between these two parties, the Global Mediterranean policy was viewed as an overall disappointment.
InWorld War II from 1940 to 1943 the area was the setting for theNorth African Campaign. During the 1950s and 1960s, all of the North African states gained independence. There remains a dispute overWestern Sahara betweenMorocco and theAlgerian-backedPolisario Front.

The wider protest movement known as theArab Spring began with revolutions inTunisia andEgypt which ultimately led to the overthrow of their governments, as well ascivil war in Libya. Large protests also occurred in Algeria and Morocco to a lesser extent. Many hundreds died in the uprisings.[41]
Further information in the sections ofArchitecture of Africa:
Further information in the sections ofHistory of science and technology in Africa:
WhileDenisovan andNeanderthal ancestry in non-Africans outside of Africa are more certain,archaic human ancestry in Africans is less certain and is too early to be established with certainty.[42]
Amenhotep III,Akhenaten, andTutankhamen carriedhaplogroup R1b.[43]Thuya,Tiye, Tutankhamen's mother, and Tutankhamen carriedhaplogroup K.[43]
Ramesses III and Unknown Man E, possiblyPentawere, carriedhaplogroup E1b1a.[43][44]
Khnum-aa,Khnum-Nakht, andNakht-Ankh carriedhaplogroup M1a1.[43]
At Takarkori rockshelter, inLibya, two naturallymummified women, dated to theMiddle Pastoral Period (7000 BP), carriedbasalhaplogroup N.[45]
TheTaforalts ofMorocco, who were found to be 63.5%Natufian, were also found to be 36.5%Sub-Saharan African (e.g.,Hadza), which is drawn out, most of all, by West Africans (e.g., Yoruba,Mende).[46] In addition to having similarity with the remnant of a morebasal Sub-Saharan African lineage (e.g., abasal West African lineage shared between Yoruba and Mende peoples), the Sub-Saharan African DNA in the Taforalt people of theIberomaurusian culture may be best represented by modern West Africans (e.g.,Yoruba).[47]
Mitochondrial haplogroups L3, M, and N are found amongSudanese peoples (e.g.,Beja,Nilotics,Nuba,Nubians), who have no known interaction (e.g., history of migration/admixture) with Europeans or Asians; rather than having developed in a post-Out-of-Africa migration context, mitochondrial macrohaplogroup L3/M/N and its subsequent development into distinct mitochondrial haplogroups (e.g.,Haplogroup L3,Haplogroup M,Haplogroup N) may have occurred inEast Africa at a time that considerably predates the Out-of-Africa migration event of 50,000 BP.[48]
Neolithicagriculturalists, who may have resided inNortheast Africa and theNear East, may have been the source population forlactase persistence variants, including –13910*T, and may have been subsequently supplanted by later migrations of peoples.[49] TheSub-SaharanWest African Fulani, theNorth AfricanTuareg, andEuropean agriculturalists, who are descendants of these Neolithic agriculturalists, share the lactase persistence variant –13910*T.[49] While shared by Fulani and Tuareg herders, compared to the Tuareg variant, the Fulani variant of –13910*T has undergone a longer period of haplotype differentiation.[49] TheFulani lactase persistence variant –13910*T may have spread, along with cattlepastoralism, between 9686 BP and 7534 BP, possibly around 8500 BP; corroborating this timeframe for the Fulani, by at least 7500 BP, there is evidence of herders engaging in the act ofmilking in the CentralSahara.[49]