first embassy was well received, Abu Yazid sent his son Ayyub to pledge allegiance to the Umayyad caliph Abd al-Rahman III, who in turn promised to send support. During the following months, heavy fighting between Abu Yazid's and the Fatimid forces occurred at Tunis, which was repeatedly captured by both sides, and Béja. In November, one of Abu Yazid's sons, Ayyub, was defeated by the Fatimids under al-Hasan ibn Ali al-Kalbi, before in turn defeating the latter. Al-Hasan ibn Ali withdrew to the territories of the Kutama Berbers in Lesser Kabylia, who were the mainstay of the Fatimid regime; from there he captured the fortresses of Tijis and Baghaya, threatening Abu Yazid's rear. Siege of Sousse and death of al-Qa'im On 13 January 946, Abu Yazid began his siege of the coastal town of Sousse. On 18 May 946, Caliph al-Qa'im bi-Amr Allah died and was succeeded by his son al-Mansur Billah. To avoid giving the rebels any advantage, al-Mansur and his government hid the death of his father, a task made easier by the reclusive life al-Qa'im had led, rarely venturing out of his palace during his reign. All public business and ceremonies were still conducted in al-Qa'im's name, and Isma'il acted ostensibly only as his heir-designate. Even the regnal name of al-Mansur ("the Victorious") was only publicly assumed after the final suppression of the uprising. The new ruler quickly gave proof of his ability. Already before his father's death, on 16 May, he sent by sea weapons and supplies to Sousse, and within days launched a coordinated attack to relieve the city: on 26 May, the garrison of Sousse, assisted by Kutama Berber cavalry from the south and troops landed by sea from the north, broke the siege of the city and forced Abu Yazid to withdraw his forces inland towards Kairouan. Battle for Kairouan Abu Yazid retreated towards Kairouan, only to find that the populace, exasperated by the exactions of his Berber partisans, had risen in revolt and shut the gates against him. After ransoming Abu Ammar from captivity, he established a camp two days' march from the city. In the meantime, al-Mansur issued a full amnesty to the notables of Kairouan in return for their renewed loyalty, and on 28 May, the caliph entered the city with his troops, and set up a fortified camp south of it. Abu Yazid attacked the camp on the morning