destination because of the 1200 year close connection between the two regions. The Arab governors of Tunis founded the Aghlabid dynasty, which ruled Tunisia, Tripolitania and eastern Algeria from 800 to 909. Tunisia flourished under Arab rule when extensive systems were constructed to supply towns with water for household use and irrigation that promoted agriculture (especially olive production). This prosperity permitted luxurious court life and was marked by the construction of new palace cities such as al-Abbasiya (809) and Raq Adda (877). After conquering Cairo, the Fatimids abandoned Tunisia and parts of Eastern Algeria to the local Zirids (972–1148). Zirid Tunisia flourished in many areas: agriculture, industry, trade, and religious and secular learning. Management by the later Zirid emirs was neglectful though, and political instability was connected to the decline of Tunisian trade and agriculture. The depredation of the Tunisian campaigns by the Banu Hilal, a warlike Arab Bedouin tribe encouraged by the Fatimids of Egypt to seize Northwest Africa, sent the region's rural and urban economic life into further decline. Consequently, the region underwent rapid urbanisation as famines depopulated the countryside and industry shifted from agriculture to manufactures. The Arab historian Ibn Khaldun wrote that the lands ravaged by Banu Hilal invaders had become completely arid desert. The main Tunisian cities were conquered by the Normans of Sicily under the Kingdom of Africa in the 12th century, but following the conquest of Tunisia in 1159–1160 by the Almohads the Normans were evacuated to Sicily. Communities of Tunisian Christians would still exist in Nefzaoua up to the 14th century. 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 Muslim Armenian adventurer Karakush. Also, Tunisia was occupied by Ayyubids between 1182 and 1183 and again between 1184 and 1187. 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 1207. After this success, the Almohads installed Walid Abu Hafs as the governor of Tunisia. Tunisia remained part of the Almohad state, until