Abu Yazid
The third Fatimid caliph in Ifriqiya was al-Mansur bi-Nasr Allah Abu Tahir Ismail al-Mansur bi-Nasr Allah, an Ismaili Shia leader. He was invested as Imam on 12 April 946 in el-Mahdia, five weeks before his father died in great pain. He took the name "el-Mansur", "the victor." At the time, el-Mahdia was under siege by the Kharidji rebel Abu Yazid. El-Mansur launched his campaign against Abu Yazid, and by August 946 had gained the upper hand in the battle for control of Kairouan. After his victory, he decided to found his new capital city at the site of his camp in the battle, just south of Kairouan. He laid out the plan immediately after the battle, in 946, although it would take another year of struggle before Abu Yazid was finally defeated.