By 1228 Abu Zakariya was the
Almohad governor of
Gabès and then of
Tunis, having inherited these positions in Tunisia from his father. Later in 1228 he rebelled against his brother
Abd-Allah, who had been head of the
Hafsid dynasty in
Ifriqiya from 1224 following the death of their father, Abu Muhammad Abd al-Wahid ibn Abi Hafs. In response, Abd-Allah marched from Tunis to Qayrawan to confront his brother in battle, but his troops deserted him and Abu Zakariya overthrew him, forcing him to be content with the title of Sheikh and to devote himself to religious life. Abu Zakariya then succeeded as head of the Hafsids. In 1229 Abu Zakariya rebelled once more 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 had 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. and the
mosque of the Kasbah. He began diplomatic and commercial relations with Emperor Frederick II of Swabia, the Crown of Aragon, Provence, Languedoc, with Venice, Pisa and Genoa. From 1239 he approached the
Kingdom of Sicily, to which he paid an annual tribute in exchange for freedom of trade and the supply of Sicilian wheat. As Tunis's maritime trade increased, it became an important economic and cultural centre. During his reign Tunis offered refuge to those fleeing the
Reconquista. Abu Zakariya welcomed to his court many notables and scholars from Andalusia. Abu Zakariyya allowed Jews who had forcibly converted to Islam in the Almohad era to return to Judaism, returning to live in relatively normal conditions. Synagogues closed or destroyed in the Almohad era were reopened or rebuilt. The Jews played a very important role in the economic policy and foreign trade developed by Abu Zakariyya. A skilful general, his ability to utilise the military power of the tribesmen enabled him to establish a strong state. His Hafsid dynasty brought peace, prosperity and stability to
Tunisia. Abu Zakariya died in 1249. His successor was
Muhammad al-Mustansir, who proclaimed himself Caliph in 1256 and continued the policies of his father. ==Sources==