The history 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 of sea travel firmly integrated North Africa into the Mediterranean world, especially during the classical period. In the 1st millennium AD, the Sahara became a major trade zone as camel caravans brought goods and people from sub-Saharan Africa. The region also has a small but strategic land connection to the Middle East, which has also played a key role in its history.

Geography

North Africa is a relatively thin strip of land between the Sahara desert and the Mediterranean, stretching from Moroccan Atlantic coast to Egypt. The region has no set definition, and varies from source to source. Generally included are, from west to east, Morocco, Algeria, Tunisia, Libya and Egypt.According to UN country classification . Western Sahara (formerly Spanish Sahara) is disputed mostly administered by Morocco. The Polisario Front claims the territory in militating for the establishment of an independent republic, and exercises limited control over rump border territories. The area located at the south of the desert is a steppe, a semi-arid region, called the Sahel. It is the ecoclimatic and biogeographic zone of transition in Africa between the Sahara desert to the north and the Sudanian Savanna to the south. The Sudanian Savanna is a broad belt of tropical savanna that spans the African continent, from the Atlantic Ocean coast in the West Sudanian savanna to the Ethiopian Highlands in the East Sudanian savanna.

Climate

In 15,000 BP, the West African Monsoon transformed the landscape of Africa and began the Green 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) in North Africa. Between 5500 BP and 4000 BP, the Green Sahara period ended.

Prehistory

The earliest known humans lived in North Africa around 260,000 BC. Through most of the Stone Age the climate in the region was very different from today, the Sahara being far more moist and savanna like. Home to herds of large mammals, this area could support a large hunter-gatherer population and the Aterian culture that developed was one of the most advanced paleolithic societies.

In the Mesolithic period, Capsian culture dominated the central part of North Africa with Neolithic farmers becoming predominant by 6000 BC. Over this period, the Sahara region was steadily drying, creating a barrier between North Africa and the rest of Africa.

In 10,000 BP, engraved and painted Central Saharan rock art began to be created, spanning the Bubaline Period, Kel Essuf Period, Round Head Period, Pastoral Period, Caballine Period, and Cameline Period.

Archaeological evidence has attested that population settlements occurred in Nubia as early as the Late Pleistocene 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.

The Nile Valley on the eastern edge of North Africa is one of the richest agricultural areas in the world. The desiccation of the Sahara is believed to have increased the population density in the Nile Valley and large cities developed. Eventually, ancient Egypt unified in one of the world's first civilizations.

Mainstream scholars have also situated the ethnicity and the origins of predynastic, southern Egypt as a foundational community in northeast Africa which included the Sudan, tropical Africa and the Sahara whilst recognising the population variability that became characteristic of the pharaonic period. Pharaonic Egypt featured a physical gradation across the regional populations, with Upper Egyptians having shared more biological affinities with Sudanese and southernly African populations, whereas Lower Egyptians had closer genetic links with Levantine and Mediterranean populations."historically not only was Upper Egypt the source of the core identifiable Egyptian culture, but that it was primarily southerners of the Eleventh/Twelfth, Seventeenth/Eighteenth, and Twenty-fifth Dynasties who politically reunited Egypt and reinvigorated its culture"

Bronze and Iron Age

Dates are approximate, consult particular article for details Bronze Age Iron Age

Classical period

The expanse of the Libyan Desert cut Egypt off from the rest of North Africa. Egyptian boats, while well suited to the Nile, were not usable in the open Mediterranean Sea. Moreover, the Egyptian merchant had far more prosperous destinations on Crete, Cyprus, and the Levant.

Greeks from Europe and the Phoenicians from Asia 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 to colonization. The Greek trade was based mainly in the Aegean, Adriatic, Black, and Red Seas and they only established major cities in Cyrenaica, directly to the south of Greece. In 332 BC, Alexander the Great conquered Egypt and for the next three centuries it was ruled by the Greek Ptolemaic dynasty.

The Phoenicians developed an even larger presence in North Africa with colonies from Tripoli to the Atlantic. One of the most important Phoenician cities was Carthage, 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 the Punic Wars, resulting in Carthage's destruction in 146 BC and the annexation of its empire by the Romans. In 30 BC, Roman Emperor Octavian 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 the nomadic tribes in the region. The Roman Empire was more confined to the coast, yet routinely expropriated Berber land for Roman farmers. They thus faced a constant threat from the south. A network of forts and walls were established on the southern frontier, eventually securing the region well enough for local garrisons to control it without broader Imperial support.

When the Roman Empire began to collapse, North Africa was spared much of the disruption until the Vandal invasion of 429 AD. The Vandals ruled in North Africa until the territories were regained by Justinian 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, the Ottomans, and the Kabyle people managed to maintain their independence.The Middle East and North Africa: Pg 156Sketches of Algeria During the Kabyle War By Hugh Mulleneux Walmsley: Pg 118The Kabyle People By Glora M. WysnerThe Encyclopedia Americana, Volume 1: Pg 568 Still, after the Arab conquest of North Africa, the Kabyle people maintained the possession of their mountains.The art journal London, Volume 4: Pg 45The Barbary Coast By Henry Martyn Field: Pg 93

Arrival of Islam

Arab Conquest

In the 7th century CE, the inception of Islam facilitated the unification of nomadic Arab tribes by bond of a common faith, preventing their historical internecine fighting along religious divisions. The main motivation for expansion was to spread Islam and convert pagans, with emphasis on the toleration of people practising other monotheistic or Abrahamic religions. Led by ingenious generals, the nascent Rashidun Caliphate centred in Medina won a series of crucial victories against the established powers in the Middle East, expanding in all directions, with the Byzantine's financial and military exhaustion from previous wars in the region inducing them to evacuate from Syria in 636 CE after only two years of conflict.

With the regional Byzantine presence and power shattered, the Muslim armies turned towards Egypt and by 642 CE had conquered all of Egypt following the siege of Alexandria, generally facing little resistance by subjects odious of Roman rule. The subsequent rapid Islamization of Egypt has been attributed to people's dismay at the disruption caused by the Chalcedonian schism. Marching up the Nile, the Muslims launched a campaign against the Makurians but were repelled in battle, in a rare defeat owing to skilled Nubian archery and natural defences.

Their attention would then turn west to the Maghreb where the Exarchate of Africa had declared independence from Constantinople under Gregory the Patrician. The Muslims effortlessly annexed Ifriqiya (modern-day Libya) and in 647 CE defeated and killed Gregory and his army decisively in battle. 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. The Rashidun armies returned to Egypt and would again invade Makuria in 652 CE only to again be repelled in battle, leading them both to sign a treaty stipulating peace, which would dictate the relations between Egypt and Nubia for over seven centuries.

Further expansion into North Africa waited another twenty years, due to the First Fitna, which led to the establishment of the Umayyad Caliphate, who moved the capital of the Muslim empire to Damascus, and its rule over the newly-conquered territories. In 670 CE, Uqba ibn Nafi al-Fihiri invaded what is now Tunisia in an attempt to take the region from the Byzantine Empire, but was only partially successful. He founded the town of Kairouan but was replaced by Abul-Muhajir Dinar in 674 CE. Abul-Muhajir successfully advanced into what is now eastern Algeria incorporating the Kingdom of Altava and Awraba tribe both ruled by Kusaila into the Islamic sphere of influence.

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 the Draa River Valley and the Sus region in what is now Morocco. However, Kusaila escaped during the campaign and attacked Uqba on his return and killed him near Biskra 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 under Zuhair ibn Kays. This caused an epiphany among the Berber that this conflict was not just against the Byzantine's. Zuhair himself was killed in 688 CE while fighting against the Byzantine Empire which had reoccupied Cyrenaica while he was busy in Tunisia.

In 693 CE, Caliph Abd al-Malik ibn Marwan sent an army of 40,000 men, commanded by Hasan ibn al-Nu'man, into Cyrenaica and Tripolitania to remove the Byzantine threat to the Umayyads advance in North Africa. They met no resistance until they reached Tunisia where they captured Carthage and defeated the Byzantines and Berbers around Bizerte.