In 800, the Abbasid Caliph Harun al-Rashid appointed Ibrahim I ibn al-Aghlab, son of a Khurasanian Arab commander from the Banu Tamim tribe,[9][10] as hereditary Emir of Ifriqiya, in response to the anarchy that had reigned in that province following the fall of the Muhallabids.
[11] Most of the Arab immigrants had come from Syria and Iraq, both of which had consistently contributed a significant number of migrants to the Maghreb region from the start.
The Aghlabids paid an annual tribute of 800,000 dirhams to the Abbasid Caliph and their suzerainty was referenced in the khutba at Friday prayers.
[12] After the pacification of the country Ibrahim ibn al-Aghlab established a residence at a new capital, al-Abbasiyya, founded outside Kairouan in 800[14] and built between 801 and 810.
[17][8]: 55 In 838/839 (224 AH) the southwestern province of Qastiliya (the Djerid region), largely inhabited by Ibadi Muslims, revolted,[18] prompting the Aghlabids to recapture Tozeur, its main city, that year.
[20][21]: 135–136 The pretense for this invasion was an internal revolt in Byzantine Sicily led by a military commander named Euphemios who requested support from the Aghlabids.
[24][25][26][full citation needed] The combined Ifriqiyan and Andalusian army then torched Mineo and laid siege to another town, possibly Calloniana (modern Barrafranca).
[27][28][full citation needed] The conquest of Sicily proceeded slowly and at an uneven pace, progressing roughly from west to east through multiple campaigns over many years.
[44][45][46][47] The historian Corrado Zedda argues that the island hosted a Muslim presence during the Aghlabid period, possibly a limited foothold along the coasts that forcibly coexisted with the local Byzantine government.
[43] According to Fabio Pinna, most Sardinian historians and archaeologists studying this period of the island's history have reached the same conclusion, denying that a Muslim conquest and occupation of Sardinia took place, due to insufficient supporting evidence from archaeology and local historical records.
[49][50][51][52][53][54][55] The expansion campaign into Sicily, which Ziyadat Allah launched right after defeating the jund rebellion that started in 824, gave the restless Arab troops of Ifriqiya a new outlet for their military energies.
They dealt with this problem by drawing the Maliki scholars into the orbit of the state and granting them appointments to high religious offices.
[56][8]: 58 Agriculture and trans-Saharan trade were further developed under Aghlabid rule, leading to economic expansion and a growing urban population.
For the rest of his life, Ibrahim II resided in a palace called Qasr al-Fath (Arabic: قصر الفتح, lit.
[41]: 119 While he was away in Sicily, Abu Abdallah struck the first significant blow against Aghlabid authority in North Africa by attacking and capturing the city of Mila (present-day eastern Algeria).
[35]: 107–108 These internal Aghlabid troubles gave Abu Abdallah the opportunity to recapture Mila and then go on to capture Setif by October or November 904.
Ziyadat Allah III stepped up anti-Fatimid propaganda, recruited volunteers, and took measures to defend the weakly-fortified city of Kairouan.
The battle lasted until the afternoon, when a contingent of Kutama horsemen outflanked the Aghlabid army and finally caused a rout.
[35]: 118 When news of the defeat reached Raqqada, Ziyadat Allah III packed his valuable treasures and fled towards Egypt.
When Ibn Abi al-Aghlab arrived on the scene after his defeat, he called on the population to mount a last-ditch resistance, but they refused.
The officialization of this doctrine faced strong opposition from the Maliki majority of Ifriqiya, particularly due to the Mu'tazilite rejection of the orthodox belief that the Qur'an was God's eternal word and therefore uncreated.
Although the Aghlabids recognized the political influence of the Maliki religious leaders, they were both unable and unwilling to alter their governmental system to align with their beliefs.
[61] The Aghlabids were major builders and erected many of the oldest Islamic-era monuments in present-day Tunisia, including military structures like the Ribat of Sousse and the Ribat of Monastir, religious buildings like the Great Mosque of Sousse and the Great Mosque of Sfax, and practical infrastructure works like the Aghlabid Reservoirs of Kairouan.
[62][63][64] One of the most important Aghlabid monuments is the Great Mosque of Kairouan, which was completely rebuilt by the emir Ziyadat Allah I in 836, although various additions and repairs were effected later which complicate the chronology of its construction.
[68] The al-Zaytuna Mosque in Tunis, which was founded earlier around 698, also owes its overall current form to the Aghlabid emir Abu Ibrahim Ahmad (r.