Abu Zakariya Yahya (, Abu Zakariya Yahya I ben Abd al-Wahid (12031249) was the founder and first sultan of the Hafsid dynasty in Ifriqiya. He was the grandson of Sheikh Abu al-Hafs, the leader of the Hintata and second in command of the Almohads after Abd al-Mu'min. Life He was the Almohad governor of Gabès and then of Tunis by 1228, having inherited this position in Tunisia from his father. And in 1228 he rebelled against his brother AbdAllah which forced him to march from Tunis to kairouan to confront his brother in battle, but his troops deserted him and Abu Zakariya overthrew him in late June. Abu Zakariya would again rebel against central authority after he heard that the Almohad caliph in Marrakesh al-Ma'mun, had overthrown and killed two of his brothers and that he cancelled the creed of Ibn Tumart. Additionally, al-Ma'mun instructed the Imams to insult Ibn Tumart in the mosques and cancelled the call to prayer in Berber. Conquests Abu Zakariya moved to expand his influence in the vicinity of his young state, and marched his army to Constantine and Béjaïa in 1229. The Almohads were preoccupied with internal differences and sedition, the revolutions that were taking place in Andalusia and in the Maghreb, so Abu Zakaria faced little resistance in annexing the territory of the Almohads. Independence from the Almohads Abu Zakariya returned to Tunis after his successful campaigns and declared independence as king altogether in 1229. He subsequently annexed Tripoli in 1234, Algiers in 1235, Chelif River 1236, and subdued important tribal confederations of the Berbers from 1235 to 1238. In July 1242 he captured Tlemcen, forcing the Sultan of Tlemcen to become his vassal and formed a series of small states between his rule and the states of the Western Maghreb. In December of that year, caliph Abd al-Wahid II, died, leaving Abu Zakariya as the most powerful ruler of Maghreb. At this time the Hafsids also occupied the Berber emirate of Siyilmasa which they retained for 30 years. By the end of his reign, the Marinid Dynasty of Morocco and several Muslim princes in Al-Andalus paid him tribute and acknowledged his nominal authority. Trade and architecture Abu Zakariyya established his capital in Tunis where mosques, madrasas, souks and other buildings are built. His work was the madrasa al-Shammā'iyya and the mosque of the Kasbah. He began diplomatic and commercial relations with Emperor