Emirate of Sicily conquer Castrogiovanni (the modern Enna, where Euphemius died) and retreated back to Mazara. In 830 they received a strong reinforcement of 30,000 Ifriqiyan and Andalusian troops. The Iberian Muslims defeated the Byzantine commander Teodotus in July–August of that year, but again a plague forced them to return to Mazara and then to Ifriqiya. The Ifriqiyan units sent to besiege Palermo managed to capture it after a year long siege in September 831. Palermo became the Muslim capital of Sicily, renamed al-Madinah ("The City"). The conquest was a see-saw affair; with considerable resistance and many internal struggles, it took over a
Emirate of Sicily had been unified by Ayyub ibn Tamim, the son of the Zirid emir of Ifriqiyya. In 1068 he left Sicily, and what remained under Muslim control fell under two qadits: one, led by Ibn Abbad (known as Benavert in western chronicles) in Syracuse, and the other under Hammud in Qas'r Ianni (modern Enna). By the 11th century mainland southern Italian powers were hiring Norman mercenaries, who were Christian descendants of the Vikings; it was the Normans under Roger I who captured Sicily from the Muslims. The Norman Robert Guiscard, son of Tancred, conquered Sicily in 1060 after taking Apulia and