OneStopList

Family trees

Hafsid Dynasty Family Tree Explained

Updated November 22, 2026

The Hafsid dynasty family tree traces the descendants of Abu Hafs Umar ibn Yahya al-Hintati, a Berber chieftain and early Almohad supporter, through 29 documented rulers who governed Ifriqiya (roughly modern Tunisia, eastern Algeria, and western Libya) from 1229 until 1574. The dynasty was founded in 1229 when Abu Zakariya Yahya declared independence from the Almohad Caliphate, and its rulers were recognized as caliphs in their own right from 1249 onward.

Origins and the Founding Father

The family’s name comes from Abu Hafs Umar ibn Yahya al-Hintati (died c. 1175), a Berber from the Hintata tribe of the High Atlas. He was a close companion of Ibn Tumart, the founder of the Almohad movement, and served as a military and religious leader. His son, Abu Muhammad Abd al-Wahid ibn Abi Hafs (1160–1221), was appointed governor of Ifriqiya by the Almohads in 1207. He ruled from Tunis, and his two sons—Abu Muhammad Abdallah and Abu Zakariya Yahya—would continue the line. Abu Zakariya Yahya (1203–1249) formally broke from the Almohads in 1229, establishing the Hafsid dynasty as an independent state.

Key Rulers and Their Lineages

The dynasty’s structure is best understood through its main branches. The direct line from Abu Zakariya Yahya produced the first caliph, Muhammad I al-Mustansir (r. 1249–1277), who took the title of caliph in 1249 and successfully repelled the Eighth Crusade in 1270. His son Yahya II al-Wathiq (r. 1277–1279) was briefly caliph before being overthrown. After a period of instability, the throne passed to a branch descended from Abu Zakariya Yahya’s other sons. Abu Hafs Umar I (r. 1284–1295) and Abu Ishaq Ibrahim (r. 1279–1283) both ruled, and their descendants intermarried with other branches.

A second major branch came from Abu Yahya Zakariya al-Lihyani (1253–1326), who was a grandson of Abu Zakariya Yahya through a different line. His son Abu Darba Muhammad (1274–1323) ruled briefly. The line then passed to Abu Yahya Abu Bakr (1293–1346), who was a great-grandson of Abu Zakariya Yahya through Abu Hafs Umar I. His sons Abu Hafs Umar II and al-Fadl Ahmad continued the dynasty, with al-Fadl Ahmad’s son Abu Ishaq Ibrahim II (1336–1369) ruling during a period of civil war.

The Later Branches and the Last Caliphs

After the mid-14th century, the Hafsid family tree becomes more complex due to frequent usurpations and power struggles. A notable branch descended from Abu al-Abbas Ahmad II (1329–1394), who ruled from 1370 to 1394. His son Abu Faris Abd al-Aziz II (r. 1394–1434) was one of the most successful later rulers, reuniting much of the territory. From Abu Faris, the line continued through his sons and grandsons, though with many interruptions. The last Hafsid caliph, Abu Abdallah Muhammad VI (r. 1573–1574), was a descendant of this later branch, and he was deposed when the Ottoman Empire conquered Tunis in 1574.

How the Family Tree Is Reconstructed

Historians rely on several sources to piece together the Hafsid family tree: contemporary chronicles such as Ibn Khaldun’s Kitab al-Ibar, coin inscriptions, and official documents. Ibn Khaldun himself served the Hafsids and wrote extensively about their genealogy. However, because the dynasty had many branches and frequent civil wars, the exact relationships between some rulers are uncertain. Modern databases like Wikidata list 29 members with verified parent–child links, but many secondary figures remain unnamed or disputed.

For example, the parentage of Abu Yahya Abu Bakr (1293–1346) is sometimes given as a son of Abu Hafs Umar I, but other sources suggest he was a grandson. The family tree is thus a combination of documented facts and scholarly inference, with some branches still debated.

Common Misconceptions

A frequent error is confusing the Hafsid dynasty with the earlier Almohad dynasty or the later Ottoman beylik of Tunis. The Hafsids were a separate ruling house, though they initially acknowledged Almohad suzerainty. Another misconception is that all Hafsids were Arabs; in fact, they were of Berber origin, though they adopted Arab cultural and religious traditions. Also, the title “caliph” used by Muhammad I al-Mustansir was not universally recognized, and many contemporary Muslim rulers did not accept it.

Why the Family Tree Matters

Understanding the Hafsid family tree is crucial for several reasons. It explains the political fragmentation of North Africa after the Almohad collapse, as different branches fought for control of Tunis and other cities. It also illuminates the dynasty’s diplomatic relations—for instance, the Hafsids exchanged embassies with Christian kingdoms like Aragon and Sicily, and their alliances shifted with dynastic changes. The family tree also helps date architectural and cultural achievements, such as the building of the Bardo Palace and the Zaytuna Mosque renovations, which were often sponsored by specific rulers.

Frequently Asked Questions

Who was the first Hafsid ruler?

Abu Zakariya Yahya (1203–1249) is considered the founder of the dynasty, as he declared independence from the Almohads in 1229. He ruled until his death in 1249 and was succeeded by his son Muhammad I al-Mustansir.

How many Hafsids ruled?

Wikidata lists 29 members with English labels, but the number of actual rulers is higher, as some ruled multiple times or in different cities. Historical sources typically count about 30 to 40 rulers, including brief usurpers.

Did the Hafsids claim to be caliphs?

Yes, starting with Muhammad I al-Mustansir in 1249, the Hafsids used the title of caliph (amir al-mu’minin), asserting religious leadership over Sunni Muslims in the Maghreb. This claim was contested by other dynasties like the Marinids and the Zayyanids.

Are the Hafsids related to the current Tunisian royal family?

No, the current Tunisian government is a republic, and there is no recognized royal family. The Hafsid dynasty ended in 1574, and no direct descendants are known to hold any formal status today.

What happened to the last Hafsid ruler?

The last Hafsid caliph, Abu Abdallah Muhammad VI, was captured by the Ottomans in 1574 and taken to Constantinople, where he was later executed. This ended the dynasty’s rule in Ifriqiya.

Where can I see a visual family tree?

Several academic books on North African history include genealogical charts, and online resources like Wikidata and Wikipedia provide interactive trees. However, be aware that some charts simplify the complex branches and may omit disputed links.

Related

How pages are sourced and corrected: Sources and editorial policy.