Ibrahim I ibn Aglab, governor of the M´Zab Valley (Algeria) since 787, was designated by the Abbasid caliph emir of the Ifriqiya, in response to the anarchy that reigned in the province, that belonged to the Baghdad Caliphate.
Ibrahim controlled an area that included the east of Algeria, Tunisia and Tripoli. Although totally independent in everything except for the name, his dynasty always acknowledged their belonging to the Aghlabid Caliphate. He built his palace in the new capital, El Abasiya, to the outskirts of Kairuan, partly so that he could escape from the opposition of jurists and theologians that disapproved their “sinful” way of life as well as the unfair treatment that they had given to the Muslim Berbers.
The Aghlabids had to deal in the limits of their emirate against the Berbers and in order to do so, they allowed and protected the settlement of immigrants from the Middle East establishing hundreds of defensive outposts (ribats).
Under the reign of the Aghlabid emirs, sea expeditions were encourage in order to sack and conquer the Christian shore of the Mediterranean Sea. Their first target was the island of Sicily. Taking advantage of the rivalries that already existed on the island, they attended the call of a Byzantine commander and managed to conquer Mazara (827) and Palermo (831). Little by little they took the rest of the island, and after a siege of nine months, they captured Syracuse on May 21, 868.
As for the siege of Syracuse, sources focus on the sufferings of the inhabitants, “reduced by starvation and disease“, and the “hyper-inflationary prices paid for paltry amounts of staple foods”. A bushel of wheat came to cost 150 gold nomismata, a bushel of flour 200, an ox 300 nomismata, and the head of a horse or a donkey 15 to 20 nomismata. After several months of siege, the inhabitants had exhausted their supplies of oil, fruit, cheese, fish, and vegetables; they were reduced to eating grass, animal skins, ground bones mixed with water, and even, according to some sources, resorting to cannibalism and eating their dead and the children.
The Muslim conquer of Sicily lasted 75 years in which the fierce resistance opposed by the Byzantine Christian garrisons never ceased, as well as the rivalries and skirmishes between the Arab chieftains. In 902 the last Byzantine post, the city of Taormina, surrendered. Nevertheless, Aghlabids didn´t enjoy the victory for long, as gradually they started to lose control of the of the forces settled in Sicily, and a new dynasty, the Khalbids, raised against the Aghlabids, separating Sicily from the influence of Ifriqiya.
Sicily was conquered and islamised between 827 and 965. Since the start of the conquer of the island, Aghlabids did not intend to create a strong, autonomous or independent power, unlike the Umayyads in Al-Andalus. This had many causes, like the limited territorial extension, its strong dependence to the nearest coasts of Africa and above all, its condition of open frontier or thagr, permanently open to the yihad.