In 827, in the midst of internal Byzantine conflict, the Aghlabids arrived at Marsala in Sicily, with a fleet of 10,000 men under the command of Asad ibn al-Furat. Palermo was conquered in 831 and became the new capital.Syracuse fell in 878 and in 902 the last Byzantine outpost, Taormina, was taken. At the same time various Muslim incursions into southern Italy occurred, with new Emirates being founded in Tropea, Taranto and Bari. During this period there were constant power struggles amongst the Muslims. Nominally the island was under rule of the Aghlabids and later the Fatimids.
After successfully suppressing a revolt the Fatimid caliph appointed al-Hasan al-Kalbi (948-953) as Emir of Sicily, the first of the Kalbid dynasty. The Fatimids appointed the Kalbids as rulers via proxy before they shifted their capital from Ifriqiya to Cairo in 969. Raids into southern Italy continued under the Kalbids into the 11th century, and in 982 a German army under Otto II was defeated by Abu'l-Qasim in the Battle of Stilo near Crotone in Calabria. The dynasty began a steady period of decline with the Emirate of Yusuf al-Kalbi (990-998) who entrusted the island to his sons and created space for interference from the Zirids of Ifriqiya. Under al-Akhal (1017-1037) the dynastic conflict intensified, with factions allying themselves variously with Byzantium and the Zirids. Even though neither of these powers could establish themselves in Sicily permanently, under Hasan as-Samsam (1040-1053) the island fragmented into small fiefdoms. The Kalbids died out in 1053, and in 1061 the Normans of southern Italy arrived under Roger I of Sicily and began their conquest, which was completed in 1091. The Muslims were allowed to remain and played an important role in the administration, army and economy of the Norman kingdom until the 12th century.
Under the Kalbid dynasty, Sicily, and especially Palermo, was an important economic centre of the Mediterranean. The Muslims introduced lemons, Seville oranges and sugar cane, as well as cotton and mulberries for sericulture, and built irrigation systems for agriculture. Sicily was also an important hub for trade between the Near East, North Africa and the Italian maritime republics such as Amalfi, Pisa and Genoa.