prosperity permitted luxurious court life and was marked by the construction of new Palace cities such as al-Abassiya (809) and Raqadda (877).
Successive Muslim dynasties ruled Tunisia (Ifriqiya at the time) with occasional instabilities caused mainly by Berber rebellions; of these reigns we can cite the Aghlabids (800–900) and Fatimids (909–972). After conquering Cairo, Fatimids abandoned North Africa to the local Zirids (Tunisia and parts of Eastern Algera, 972–1148) and Hammadid (Central and eastern Algeria, 1015–1152). Zirid Tunisia prospered, with agriculture, industry, trade and learning, both religious and secular, all flourishing. Management of the later Zirid emirs was neglectful though, and political instability was connected to the decline of Tunisian trade and agriculture. The invasion of Tunisia by the Banu Hilal, a warlike Arab Bedouin tribe encouraged by the Fatimids of Egypt to seize North Africa, sent the region's urban and economic life into further decline. The Arab historian Ibn Khaldun wrote that the lands ravaged by Banu Hilal invaders had become completely arid desert.
The coasts were held briefly by the Normans of Sicily in the 12th century, but following the conquest of Tunisia in 1159–1160 by the Almohads the last Christians in Tunisia disappeared either through forced conversion or emigration. The Almohads initially ruled over Tunisia through a governor, usually a near relative of the Caliph. Despite the prestige of the new masters, the country was still unruly, with continuous rioting and fighting between the townsfolk and wandering Arabs and Turks, the latter being subjects of the Armenian adventurer Karakush. The greatest threat to Almohad rule in Tunisia was the Banu Ghaniya, relatives of the Almoravids, who from their base in Mallorca tried to restore Almoravid rule over the Maghreb. Around 1200 they succeeded in extending their rule over the whole of Tunisia, until they were crushed by Almohad troops in