The Warfajuma conquest of Ifriqiya was an 8th-century military campaign led by the Warfajuma, a Sufri Berber tribe hailing from Nefzaoua, against the Fihrids, an Arab clan that ruled the North African region of Ifriqiya. The campaign culminated in the Warfajuma capture of Kairouan, the capital of Ifriqiya, and the massacre of its defending Arab garrison. The fall of Kairouan led to the end of the Fihrid dynasty and their rule in North Africa.
Background
The death of Abd al-Rahman ibn Habib, the governor of what was left of the Arabs in Ifriqiya, in 755 led to a protracted power struggle within the Fihri family. Abd al-Rahman's eldest son, Habib ibn Abd al-Rahman, took power in his wake, but his claim to the throne was contested by his uncle Ilyas ibn Habib al-Fihri. To avoid civil war, a proposal was made to divide the governorship of Ifriqiya among family members; however, Ilyas rejected this arrangement.
Ilyas subsequently moved against his relatives, attempting to consolidate his power. The move led to open conflict with Habib, and the two eventually met in battle near Laribus in modern-day Tunisia. According to Arab historian Ibn Khaldun, Habib proposed settling the dispute through a duel. Ilyas accepted his offer and was killed. In December of 755, Habib returned to Kairouan at the head of a procession, carrying Ilyas’s head with him.
Despite this victory, internal divisions within the Fihri family continued to persist. The supporters of the defeated Ilyas, led by Arab noble Abd al-Warith, fled south after his death. Seeking protection and an opportunity to regain influence, they formed an alliance with the Ourferdjouma, a large tribe of Berbers opposed to Arab rule.
Campaign
In 756 AD, Habib ibn Abd al-Rahman raised an army and set out south to defend Ifriqiya against the impending arrival of the Warfajuma army, leaving his qadi Abu Quraib in charge of Kairouan. The Ifriqiyan army was subsequently defeated by the Berbers; Habib fled the battlefield and proceeded to take shelter in Gabès, where he sent a letter to Abu Quraib appealing for reinforcements from Kairouan. However, Habib's reinforcements were intercepted and defeated by the Berbers before they could reach Gabès, leaving the city of Kairouan undefended.
In 757 AD, the Warfajuma forces, led by Asim ibn Jamil al-Warfajumi, entered the city of Kairouan without resistance and proceeded to slaughter its Arab residents en masse. Asim bin Jamil subsequently departed from Kairouan, appointing Abd al-Malik ibn Abi Ja’d al-Nafzawi as its governor. He advanced with his forces toward Gabès, where he defeated Habib and compelled him to withdraw to the Aurès Mountains. Habib reorganized his forces and attempted to recapture Kairouan, but was defeated and killed by the Berbers in a battle on the outskirts of the city in May/June 757.
Habib's death ended the rule of the Fihri family in Ifriqiya. The descendants of Uqba ibn Nafi, the Umayyad general who had conquered Ifriqiya in the 7th century, were wiped out at the hands of the Berbers, who continued to plunder the city. The Berber forces reportedly entered the Great Mosque of Kairouan, where the Arab Qurayshi residents of the city had taken shelter, and proceeded to massacre its inhabitants.
Aftermath
In 758, the Ibadis of Tripoli seized Kairouan and the rest of the Ifriqiya region from the Warfajuma. Abu al-Khattab, leader of the Ibadis, proceeded to annex the region as a province and continued to rule from his established capital in Tripoli.
This war marked an end to Arab rule in Northwest Africa. The new rulers of Ifriqiya were Berber Kharijites, who maintained their cultural identity and political control separate from the Arabs and owed no allegiance to the them.