Politico-religious loans from Kharijite, Zaydiyyah and Sunni Islam
The Muslim conquest of the Maghreb which started with the storming of Tripoli in 642 took over half a century. Troops reached the North-African Atlantic board with Musa bin Nusayr's military victories (705-709). The land and the people, essentially Berber tribes, were set under the authority of a Kairouan-based Aghlabid[1] governor in the service of the Umayyad caliph in Damascus. This power was challenged by the Kharijites[2] opponents both to the caliphal authority and to its Shiia adversaries who had committed their politico-religious obedience to the descendants of Ali[3] and Fatima[4] in deference to the Quranic “text” (bil-nass). The Kharijites took the city of Tangiers in 730 and triggered a general uprising in 742. In 750, the fall of the Umayyads in Damascus brought in a new dynasty, the Abbasids who moved the centre of caliphal power to Baghdad while an Umayyad branch continued to reign in Andalusia. This event afforded the westernmost region of the empire a strong autonomy. South of the Straights, at the end of the 8th century, the Idrisids, a Shia tribe fleeing persecution in the East gained the upper hand (789-986). Claiming descent from Ali, Idris I[5] was favourably received by the Walili Berber populations in 788 and had his authority recognised by Tlemcen Kharijites. In 789, he founded a settlement on the right bank of the Wadi Fas but was murdered on order of the Abbasid caliph in 792. Harnessing diplomacy and force, Idris II[6], born after his father's death managed to bring some stability around him. He extended to the first city of Fes in 809 a second walled city which soon became a commercial and cultural Arabic speaking centre, where the Al-Karaouine Mosque was built in 859. He broke with Khariji Islam. His proto-state had basic institutions: the sovereign had his own coinage; he collected taxes and led military operations. Meanwhile Fes' dynamism was not enough to conceal the political rifts: the splitting of the kingdom between Idris' sons opened an era of contentions which considerably weakened their power to the advantage of independent emirates and of the Andalusian branch of the Umayyad dynasty.
The splintering of power, confusing though it was according to sources, did not affect the ongoing Islamization of the populations. The dynasty gradually crumbled towards the end of the 9th century. It lost its good name. Among the facts on record, geographer al-Bakri reports an act that appalled the whole population of Fes: the rape of a young Jewish girl by Yahia II[7], reportedly drunk for good measure. The fighting went on between Arab and Berber tribes and the Kharijite initiated sporadic mobilisations. The Fatimids[8], founders of a Shia dynasty in Ifriqiyya[9] seized upon this deleterious situation to conquer the city of Fes in 921 and Cordoban Umayyads set up a garrison in Ceuta. A handful of tribal blocs were the actual decision-makers: Zanata from the West, Ghomora from the Rif, Barghwata from the Chaouia, Masmuda from the High Atlas and Sanhaja in the South. The religious grounding remained uncertain in so far as Pagan, Shiia and Karijite elements still flavoured an increasingly dominant Sunni Islam.
The Almoravids had their roots in the Berber tribe of the Judala Sanhaja. In 1058, this body of warriors fighting in the name of Islam, from a base on an island at large of what is now Senegal, started the fight against the African empire of Ghana which collapsed in 1077. Gathered around Yusuf Ibn Tashfin[10], the true founder of the dynasty, the Almoravids, launched an offensive northwards and fixed the seat of their power in Marrakesh. In 1085, they were called upon to lead the Jihad against the Christian sovereigns of the Iberian Peninsula. They won a decisive victory against Alfonso VI[11] in Sagrajas in 1086. At Yusuf Ibn Tashfin's death, their empire embraced Andalusia and a large part of Northern Africa. But half a century later, they were unseated by the Almohads (al-muwahidun, « those who uphold divine unity »
). Arising from Berber tribes from the High-Atlas, the Almohads declared themselves the followers of Ibn Tumart. They asserted their power after his death under the leadership of his disciple Abd al-Mumin[12]. Who would take Tlemcen, Fes and Marrakesh before crossing the Mediterranean to seize Cordoba (1148) and Granada (1154) from the Almoravids. These internecine wars ended up weakening their positions before the Christian powers and one of Abd al-Mumin's successors was defeated at the battle of Las Navas de Tolosa (1212). In Africa, local dynasties asserted themselves: Hafsids in Tunis (1236), Abdelwadids in Tlemcen (1239) and Merinids in Marrakesh (1269).