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 of the multi-ethnic County and subsequent Kingdom of Sicily, until those who had not already converted were expelled in the 1240s. Until the late 12th century, and probably as late as the 1220s, Muslims formed a substantial portion of the island's population. Their influence remains in some elements of the Sicilian language, as well as surnames and locations. In 535, Emperor Justinian I returned Sicily to the Roman Empire, now ruled from Constantinople exclusively. As the power of what is now known as the Byzantine Empire waned in the West, Sicily was conquered by the Rashidun Caliphate during the reign