Algeria's history has been shaped by its position between the Mediterranean, the Maghreb, and the Sahara. While much of its political life developed along the northern coastal plains, the region's deeper foundations lie in indigenous Amazigh societies, including the Numidians, who formed one of the earliest known states in the area. Over time, Algeria came into contact with Phoenician, Roman, Vandal, and Byzantine powers, each leaving traces on its historical landscape. The spread of Islam from the 7th century, followed by Arab migrations, gradually reshaped the region's culture, language, and religious identity, producing an Algerian identity rooted in both Arab-Islamic and Amazigh heritage. After the weakening of Umayyad authority following the Berber Revolt of 740, Algeria was ruled by several local Islamic dynasties, including the Rustamids, Fatimids, Zirids, Hammadids, Almohads, and Zayyanids. In the Ottoman era, the Regency of Algiers rose as a powerful and largely self-governing state in the western Mediterranean, maintaining only nominal allegiance to the Ottoman Empire. France invaded Algeria in 1830, annexed it in 1848, and extended control over the territory only after decades of resistance. In modern times, Algeria's history has been especially marked by the War of Independence and the Civil War of the 1990s.
Prehistory
Evidence of the early human occupation of Algeria is demonstrated by the discovery of 1.8 million year old Oldowan stone tools found at Ain Hanech in 1992. In 1954 fossilised Homo erectus bones were discovered by C. Arambourg at Ternefine that are 700,000 years old. Neolithic civilization (marked by animal domestication and subsistence agriculture) developed in the Saharan and Mediterranean Maghrib between 6000 and 2000 BC. This type of economy, richly depicted in the Tassili n'Ajjer cave paintings in southeastern Algeria, predominated in the Maghrib until the classical period.
Numidia Numidia (Berber: Inumiden; 202–40 BC) was the ancient kingdom of the Numidians located in northwest Africa, initially comprising the territory that now makes up modern-day Algeria, but later expanding across what is today known as Tunisia, Libya, and some parts of Morocco. The polity was originally divided between the Massylii in the east and the Masaesyli in the west. During the Second Punic War (218–201 BC), Masinissa, king of the Massylii, defeated Syphax of the Masaesyli to unify Numidia into one kingdom. The kingdom began as a sovereign state and later alternated between being a Roman province and a Roman client state.
Numidia, at its largest extent, was bordered by Mauretania to the west, at the Moulouya River, Africa to the east (also exercising control over Tripolitania), the Mediterranean Sea to the north, and the Sahara to the south. It was one of the first major states in the history of Algeria and the Berbers.
War With Rome By 112 BC, Jugurtha resumed his war with Adherbal. He incurred the wrath of Rome in the process by killing some Roman businessmen who were aiding Adherbal. After a brief war with Rome, Jugurtha surrendered and received a highly favourable peace treaty, which raised suspicions of bribery once more. The local Roman commander was summoned to Rome to face corruption charges brought by his political rival Gaius Memmius. Jugurtha was also forced to come to Rome to testify against the Roman commander, where Jugurtha was completely discredited once his violent and ruthless past became widely known, and after he had been suspected of murdering a Numidian rival.
War broke out between Numidia and the Roman Republic and several legions were dispatched to North Africa under the command of the Consul Quintus Caecilius Metellus Numidicus. The war dragged out into a long and seemingly endless campaign as the Romans tried to defeat Jugurtha decisively. Frustrated at the apparent lack of action, Metellus' lieutenant Gaius Marius returned to Rome to seek election as Consul. Marius was elected, and then returned to Numidia to take control of the war. He sent his Quaestor Sulla to neighbouring Mauretania in order to eliminate their support for Jugurtha. With the help of Bocchus I of Mauretania, Sulla captured Jugurtha and brought the war to a conclusive end. Jugurtha was brought to Rome in chains and was placed in the Tullianum.
Jugurtha was executed by the Romans in 104 BC, after being paraded through the streets in Gaius Marius' Triumph.
Independence The Greek historians referred to these peoples as "Νομάδες" (i.e. Nomads), which by Latin interpretation became "Numidae" (but cf. also the correct use of Nomades). Historian Gabriel Camps, however, disputes this claim, favoring instead an African origin for the term.
The name appears first in Polybius (second century BC) to indicate the peoples and territory west of Carthage including the entire north of Algeria as far as the river Mulucha (Muluya), about 160 kilometres (100 mi) west of Oran.
The Numidians were composed of two great tribal groups: the Massylii in eastern Numidia, and the Masaesyli in the west. During the first part of the Second Punic War, the eastern Massylii, under their king Gala, were allied with Carthage, while the western Masaesyli, under king Syphax, were allied with Rome. The Kingdom of Masaesyli under Syphax extended from the Moulouya river to Oued Rhumel.
However, in 206 BC, the new king of the eastern Massylii, Masinissa, allied himself with Rome, and Syphax of the Masaesyli switched his allegiance to the Carthaginian side. At the end of the war, the victorious Romans gave all of Numidia to Masinissa of the Massylii. At the time of his death in 148 BC, Masinissa's territory extended from the Moulouya to the boundary of the Carthaginian territory, and also southeast as far as Cyrenaica to the gulf of Sirte, so that Numidia entirely surrounded Carthage (Appian, Punica, 106) except towards the sea. Furthermore, after the capture of Syphax the king in modern day Morocco with his capital based in Tingis, Bokkar, had become a vassal of Massinissa. Massinissa had also penetrated as far south beyond the Atlas to the Gaetuli and Fezzan was part of his domain.
In 179 B.C. Masinissa had received a golden crown from the inhabitants of Delos as he had offered them a shipload of grain. A statue of Masinissa was set up in Delos in honour of him as well as an inscription dedicated to him in Delos by a native from Rhodes. His sons too had statues of them erected on the island of Delos and the King of Bithynia, Nicomedes, had also dedicated a statue to Masinissa.
After the death of the long-lived Masinissa around 148 BC, he was succeeded by his son Micipsa. When Micipsa died in 118 BC, he was succeeded jointly by his two sons Hiempsal I and Adherbal and Masinissa's illegitimate grandson, Jugurtha, who was very popular among the Numidians. Hiempsal and Jugurtha quarrelled immediately after the death of Micipsa. Jugurtha had Hiempsal killed, which led to open war with Adherbal.
Phoenician traders arrived on the North African coast around 900 BC and established Carthage (in present-day Tunisia) around 800 BC. During the classical period, Berber civilization was already at a stage in which agriculture, manufacturing, trade, and political organization supported several states. Trade links between Carthage and the Berbers in the interior grew, but territorial expansion also resulted in the enslavement or military recruitment of some Berbers and in the extraction of tribute from others.
The Carthaginian state declined because of successive defeats by the Romans in the Punic Wars, and in 146 BC, the city of Carthage was destroyed. As Carthaginian power waned, the influence of Berber leaders in the hinterland grew.
By the 2nd century BC, several large but loosely administered Berber kingdoms had emerged. After that, king Masinissa managed to unify Numidia under his rule.Les cultures du Maghreb De Maria Angels Roque, Paul Balta, Mohammed ArkounDialogues d'histoire ancienne De Université de Besançon, Centre de recherches d'histoire ancienne
Roman empire
Christianity arrived in the 2nd century. By the end of the 4th century, the settled areas had become Christianized, and some Berber tribes had converted en masse.
After the fall of the Western Roman Empire, Algeria came under the control of the Vandal Kingdom. Later, the Eastern Roman Empire (also known as the Byzantine Empire) conquered Algeria from the Vandals, incorporating it into the Praetorian prefecture of Africa and later the Exarchate of Africa.
Medieval Muslim Algeria
From the 8th century Umayyad conquest of North Africa led by Musa bin Nusayr, Arab conquest started. The 11th century invasion of migrants from the Arabian peninsula brought oriental tribal customs. The introduction of Islam and Arabic had a profound impact on North Africa. The new religion and language introduced changes in social and economic relations, and established links with the Arab world through acculturation and assimilation.
The second Arab military expeditions into the Maghreb, between 642 and 669, resulted in the spread of Islam. The Umayyads (a Muslim dynasty based in Damascus from 661 to 750) recognised that the strategic necessity of dominating the Mediterranean dictated a concerted military effort on the North African front. By 711 Umayyad forces helped by Berber converts to Islam had conquered all of North Africa. In 750 the Abbasids succeeded the Umayyads as Muslim rulers and moved the caliphate to Baghdad. Under the Abbasids, Berber Kharijites Sufri Banu Ifran were opposed to Umayyad and Abbasids. After, the Rustumids (761–909) actually ruled most of the central Maghrib from Tahirt, southwest of Algiers. The imams gained a reputation for honesty, piety, and justice, and the court of Tahirt was noted for its support of scholarship. The Rustumid imams failed, however, to organise a reliable standing army, which opened the way for Tahirt's demise under the assault of the Fatimid dynasty.
The Fatimids left the rule of most of Algeria to the Zirids and Hammadid (972–1148), a Berber dynasty that centered significant local power in Algeria for the first time, but who were still at war with Banu Ifran (kingdom of Tlemcen) and Maghraoua (942-1068).Ibn Khaldun, History of Berber, party Zenata and Sanhadja This period was marked by constant conflict, political instability, and economic decline. Following a large incursion of Arab Bedouin from Egypt beginning in the first half of the 11th century, the use of Arabic spread to the countryside, and sedentary Berbers were gradually Arabised.
The Almoravid ("those who have made a religious retreat") movement developed early in the 11th century among the Sanhaja Berbers of southern Morocco. The movement's initial impetus was religious, an attempt by a tribal leader to impose moral discipline and strict adherence to Islamic principles on followers. But the Almoravid movement shifted to engaging in military conquest after 1054. By 1106, the Almoravids had conquered the Maghreb as far east as Algiers and Morocco, and Spain up to the Ebro River.
Like the Almoravids, the Almohads ("unitarians") found their inspiration in Islamic reform. The Almohads took control of Morocco by 1146, captured Algiers around 1151, and by 1160 had completed the conquest of the central Maghrib. The zenith of Almohad power occurred between 1163 and 1199. For the first time, the Maghrib was united under a local regime, but the continuing wars in Spain overtaxed the resources of the Almohads, and in the Maghrib their position was compromised by factional strife and a renewal of tribal warfare.