Uqba Ibn Nâfi founded the city of Kairouan in 670 A.D., a bridgehead for the conquest of Maghrebian territory. In 682 he led an expedition that would take him to Tlemcen. He eventually reached the sea but upon his return he decided to split his army, sending part of it directly back to Ifriqiya (now Tunisia) through the high plains, while leading the remaining part of his army southwards to the edge of the Sahara. His troops were assaulted by those of a Kusayla Berber leader. He lost the battle and was killed in 683 A.D. in Tehud, Biskra. The Arabs decided to regroup in Tripolitania. They would eventually capture Kairouan in 691 A.D. and Carthage in 697 A.D.
Berber resistance gradually reemerged in the Aures Mountains under the leadership of a woman, Kahina. She was defeated in 698 A.D. After 711 A.D. the Maghreb became a province of the Arab Empire, at least theoretically. In actuality, strictly from a military point of view, the conquest of central Maghreb was a failure. After fifty years of struggle the Arabs only controlled Ifriqiya. The conversion of the Berbers to Islam proceeded but it faced great resistance and resulted in numerous schisms.
Most of the 8th Century was defined by a sustained revolt against central Arabic government that originated from an oriental schism, the Kharijism. Beginning in 141 A.D., having joined this movement, central Maghreb had already earned its independence. The Maghreb was then controlled by Kharijite natives who were unified around a Persian family known as the Rostemides that would rule over Tahert, now known as Tiaret.
Two key elements defined the emergence of this dynasty, the refusal to submit to a Byzantine-based state geared to exploitation and inequity, and the refusal to submit to any foreign domination. While Zenete Berbers gradually spread onto the high plains, driven by Kharijism, the other branch, the Sanhadjas, inhabited the mountainous areas of central and eastern Algeria.
One of these tribes, the Kutamas, settled in Small Kabylie and sponsored a Shiite missionary, Abu‘Abdallah. Shiites believe that only Ali and his descendents, the sons of Fatima, are the Prophet‘s legitimate Caliphs. It all began in 893-894 A.D. at Makkah, when a number of Kutama chiefs met Abu ‚Abdallah, the Shiite missionary (dâ‘ia), while on a pilgrimage. The missionary won them over and accompanied them on their way back to the Maghreb. He settled in Ikjan, in the mountainous area separating the Setif plain from the Tellian Atlas.
He then assembled an army and attacked the fortresses built by the Aghlabides that faced the Kabylie and Aures mountains. After many assaults, the Kutamas, led by Abu ‚Abdallah, finally crushed the Aghlabides‘ army.
In the next few years, they would conquer Setif, Constantine, Bejaia and Kairouan in March 909 A.D. He then proceeded to seize Sijilmassa in southern Morocco, where ‚Ubayd Allah, a Fatimide Mahdi, was held prisoner. Once free ‚Ubayd Allah affirmed his Mahdi status and became Emir al-Mouminine, Commander of the Faithful.
During their three hundred-year history, from the early 10th Century to late 12th Century, the Fatimides inhabited the Maghreb for a mere sixty years. In 973 A.D. they settled in Egypt making Cairo their capital city. Before returning to the Orient the Fatimide Caliph entrusted his Sanhadja lieutenant, Ziri Ibn Manâd, with the governance of the Maghreb. He would go on to establish the Ziride dynasty.
While marching through ancient Numidia, the Zirides gave their former central Maghrebian realm to their Hammadide cousins. For a century and a half Hammadides ruled over Central Maghreb.
They established two successive capital cities. Built in 1007 A.D., the first capital of Kalaa of Beni Hammad was located at the Tellian heights overlooking the Hodna Steppe on a trading route between the Biskra region and the sea. Founded in 1607 A.D. the second capital of Bejaia (Bougie) became the main trading, political and cultural center of all Maghreb.
Three generations later, the Zirides had rejected Fatimide and Shiite suzerainty. In retaliation the Fatimide Caliph deployed nomadic Arab tribes, then stationed in Upper Egypt, to attack the Maghreb.
The Almohade Empire rose from a Sanhadja mountain tribe, the Masmoudas of the High Moroccan Atlas and from the religious reformer Ibn Toumert. Ibn Toumert became a Mahdi and established his base at Tinmall in 1124 A.D. amid the mountains. Following his death in 1130 A.D. his successor, ‚Abd el-Moumen, became Amir el Mou‘minin, Commander of the Faithful.
It was under his leadership that the Almohades set out to conquer the Maghreb. They first conquered the southwest by taking control of the gold route. Then they advanced northwards to secure Fès. They seized Marrakech, the Almoravide capital in 1146 A.D. Almohades armies kept marching eastwards.
The fall of Bejaia in 1151 A.D. signaled the end of the Hammadide kingdom.
The fall of Mahdia in 1160 A.D. marked the end of the Ziride kingdom and, importantly, it also led to the defeat of the Sicilian Normans who had occupied the city for the prior twelve years. Almohades carried this fight against the advance of the Christians into the Mediterranean and over to Spain (Andalusia), where they did their best to confine the „reconquista.“
The constant state of war maintained by the Almohades against Spain‘s Castilians would have a disastrous effect on the Maghrebian economy since the bulk of its resources were allocated to the war effort. Spanish sovereigns would eventually get the upper hand in this confrontation. Almohades were defeated in 1212 A.D. at the battle of Las Navas de Tolosa. Furthermore, the Almohade State was also unable to control internal dissension that was producing recurring rebellions.
As the Almohade Empire finally collapsed the Maghreb was once again fragmented, this time along a three-part axis, the Hafside kingdom of Ifriqiya (Tunisia and east Algeria) in the East, the Abdalwadides in central Maghreb with Tlemcen as its capital city, and Merinides in Morocco, in the west.
The Hafside kingdom extended from Algiers to Tripoli, with Bejaia, Constantine, Kairouan, Mahdia, Sfax and
Tunis under its rule. Aghlabides could only claim one city, Tlemcen.
These cities were essentially Arabic centers and none of the sovereigns‘ traits could be said to be specifically of Berber heritage.
During their roughly three hundred-year history, from the early 10th Century to late 12th Century, the Fatimides inhabited the Maghreb for a mere sixty years or so.