أطلس الزمانIslamic history from pre-Islamic Arabia to 1924 العربية
IfriqiyaSultanate

Ḥafṣids

626–982 AH · 1229–1574 CE (345 years)
Almohad governors of Ifrīqiya who declared independence under Abū Zakariyyāʾ Yaḥyā (1229); al-Mustanṣir (1249–1277) claimed the caliphate and withstood the crusade of Louis IX (1270). Tunis flourished as a centre of learning (Ibn Khaldūn was born there in 1332); caught between Spain and the Ottomans, the dynasty ended with the Ottoman conquest of Tunis in 1574.

Its extent over time

626 AH · 1229 CEGreatest extent: 632 AH · 1235 CE982 AH · 1574 CE

Its rulers (30)

The names in order
Yahya I Abu Zakariyya626–647 AH · 1229–1249 CEGovernor of Ifriqiya for the Almohads, he broke away in 1229 (EI: 1228) and took Constantine and Bougie in 1230 and Algiers soon after. The Hafsid princes of Bougie and Constantine were at times independent of Tunis (1285-99, 1312-18, 1369-70); they are not listed here.
Muhammad I al-Mustansir647–676 AH · 1249–1277 CETook the title of caliph in 1253.
Yahya II al-Wathiq676–678 AH · 1277–1279 CEForced to abdicate in favour of his uncle Abu Ishaq, who later had him put to death.
Ibrahim I Abu Ishaq678–682 AH · 1279–1283 CEDriven out of Tunis in 1283 by the usurper Ibn Abi Umara; his son Abu Faris, who had made him abdicate at Bougie, was executed by the usurper in June 1283, and he was put to death too.
Ibn Abi Umara682–683 AH · c. 1283–1284 CEAn adventurer from the south, proclaimed caliph in 1282 and in Tunis in 1283; overthrown by the Arabs and Abu Hafs.
Umar I Abu Hafs683–694 AH · c. 1284–1295 CEAfter 1285 he held Tunis only; Bosworth lists a rival, Yahya III al-Muntakhab, at Bougie and Constantine.
Muhammad II Abu Asida694–709 AH · c. 1295–1309 CEPosthumous son of al-Wathiq; his chief minister was the Almohad shaykh Ibn al-Lihyani.
Abu Bakr I Abu Yahya al-Shahid709–709 AH · c. 1309–1309 CEReigned seventeen days.
Khalid I Abu al-Baqa709–711 AH · c. 1309–1311 CEDriven out by Ibn al-Lihyani.
Zakariyya I Ibn al-Lihyani711–717 AH · c. 1311–1317 CEAn old Almohad shaykh who seized the throne.
Muhammad III Abu Darba717–718 AH · c. 1317–1318 CESon of Ibn al-Lihyani; resisted nine months.
Abu Bakr II al-Mutawakkil718–747 AH · c. 1318–1346 CERestored the unity of the Hafsid state after the rival branches had held Tunis in turn.
Ahmad Abu al-Abbas747–747 AH · c. 1346–1346 CEKilled by his brother Abu Hafs, which gave the Marinid Abu al-Hasan his pretext to invade. Bosworth does not list him.
Umar II Abu Hafs747–749 AH · c. 1346–1348 CEThe Marinids of Abu al-Hasan then held Tunis in 1348-50.
al-Fadl Abu al-Abbas751–751 AH · c. 1350–1350 CEProclaimed after the Marinids left and soon put down by the minister Ibn Tafragin.
Ibrahim II Abu Ishaq751–758 AH · c. 1350–1357 CEBrother of al-Fadl, put on the throne young while Ibn Tafragin held the power; the Marinids occupied Tunis briefly in 1357.
Ibrahim II Abu Ishaq (restored)758–770 AH · c. 1357–1369 CEHeld Tunis, while other Hafsid princes ruled at Bougie and Constantine.
Khalid II Abu al-Baqa770–771 AH · c. 1369–1370 CEA boy when he succeeded; ousted by Abu al-Abbas of Constantine.
Ahmad II Abu al-Abbas al-Mustansir771–796 AH · c. 1370–1394 CEReunited Ifriqiya a third time from Constantine and Bougie and restored the dynasty's standing.
Abd al-Aziz Abu Faris al-Mutawakkil796–837 AH · c. 1394–1434 CEExtended Hafsid rule over the whole of the country and took Algiers; his armies reached Fez, and he died on campaign against Tlemcen.
Muhammad IV al-Muntasir837–838 AH · c. 1434–1435 CE
Uthman Abu Amr838–893 AH · c. 1435–1488 CEBrother of al-Muntasir.
Yahya IV Abu Zakariyya893–894 AH · c. 1488–1489 CEGrandson of Uthman; killed by his cousin Abd al-Mumin.
Abd al-Mumin ibn Ibrahim894–895 AH · c. 1489–1490 CEDethroned by a son of Yahya IV.
Zakariyya II Abu Yahya895–899 AH · c. 1490–1494 CEDied young of plague.
Muhammad V al-Mutawakkil899–932 AH · c. 1494–1526 CEThe Spaniards took Bougie and Tripoli from him in 1510.
al-Hasan932–941 AH · 1526–1534 CEDriven out of Tunis by Khayr al-Din Barbarossa, the Ottoman governor of Algiers, in August 1534.
al-Hasan (restored)942–950 AH · 1535–1543 CERestored by Charles V in July 1535 as his vassal; deposed by his son Ahmad.
Ahmad III Abu al-Abbas950–977 AH · 1543–1569 CELost Tunis to the Ottoman governor of Algiers in 1569.
Tunis was under Ottoman rule from 1569 until Don John of Austria took it in 1573.
Muhammad VI981–982 AH · c. 1573–1574 CEPut on the throne by the Spaniards as their vassal; Tunis fell to the Ottomans in 1574 and the dynasty ended.
Lands it ruled (6)
Bijāya, Constantine and the Zāb (the eastern central Maghrib)626–931 AH · 1229–1525 CEAbū Zakariyyāʾ took Constantine and Bijāya about 1230; Ḥafṣid princes often ruled them apart from Tunis (1285–1309, 1357–70), the Marīnids occupied them for short spells in 1347–57, and Spain held Bijāya from 1510.
Ifrīqiya (Tunisia)626–942 AH · 1229–1535 CEAbū Zakariyyā Yaḥyā ended the Almohad khuṭba in 1229 and his heirs claimed the caliphate from 1253; Tunis was held briefly by the Marīnids (1347–49) and by Barbarossa's Ottomans (1534–35).
Tripolitania (Tripoli, Jabal Nafūsa, Sirte)626–727 AH · 1229–1327 CEHafsid governors ruled from Tunis; the Hafsid sultan al-Liḥyānī (1311–17) rose from Tripoli and retired there, and its people expelled his deputy in 1324.
Algiers, the Mitidja and Titteri (Médéa, Miliana, Ténès)632–710 AH · 1235–1310 CEThe Ḥafṣids claimed it and intervened often, but the notable Ibn ʿAllān ran the city for fourteen years until a Zayyānid displaced him.
Tripolitania (Tripoli, Jabal Nafūsa, Sirte)803–916 AH · 1401–1510 CEHafsid governors ruled until the later 15th century, when elected local shaykhs took over the city in loose obedience to Tunis.
Ifrīqiya (Tunisia)942–982 AH · 1535–1574 CE · under Spanish Monarchy and EmpireAfter Charles V took Tunis in 1535 the Ḥafṣids reigned as Spanish clients behind a garrison at La Goletta, with an Ottoman occupation between 1569 and 1573.
Sources (4)
al-Muqaddima & Kitab al-'Ibar — Ibn Khaldun
Robert Brunschvig, La Berbérie orientale sous les Hafsides (Paris, 1940–47)
The New Islamic Dynasties: A Chronological and Genealogical Manual — C. E. Bosworthno. 18, The Hafsids
Encyclopaedia of Islam (2nd/3rd ed.) — BrillHafsids, vol. 3

Open in the atlas