page_title: Tunisia
section_title: Middle Ages
hierarchical_section_title: Tunisia / History / Middle Ages
caption_attribution_description: View of the flat roof and domes of the Great Mosque of Kairouan (also called the Mosque of Uqba), in Tunisia.
context_page_description: Tunisia, officially the Republic of Tunisia, is a country in the Maghreb region of North Africa, covering 163,610 square kilometres. Its northernmost point, Cape Angela, is also the northernmost point on the African continent. Tunisia is bordered by Algeria to the west and southwest, Libya to the southeast, and the Mediterranean Sea to the north and east. Tunisia's population was 11.7 million in 2019. Tunisia's name is derived from its capital city, Tunis, which is located on its northeast coast.
  Geographically, Tunisia contains the eastern end of the Atlas Mountains, and the northern reaches of the Sahara desert. Much of the rest of the country's land is fertile soil. Its 1,300 kilometres of coastline include the African conjunction of the western and eastern parts of the Mediterranean Basin.
  Tunisia is a unitary semi-presidential representative democratic republic. It is considered to be the only fully democratic sovereign state in the Arab world. It has a high human development index.
context_section_description: Sometime between the second half of the 7th century and the early part of the 8th century, Arab Muslim conquest occurred in the region. They founded the first Islamic city in Northwest Africa, Kairouan. It was there in 670 AD that the Mosque of Uqba, or the Great Mosque of Kairouan, was constructed. This mosque is the oldest and most prestigious sanctuary in the Muslim West with the oldest standing minaret in the world; it is also considered a masterpiece of Islamic art and architecture.
  Tunis was taken in 695, re-taken by the Byzantine Eastern Romans in 697, but lost finally in 698. The transition from a Latin-speaking Christian Berber society to a Muslim and mostly Arabic-speaking society took over 400 years (the equivalent process in Egypt and the Fertile Crescent took 600 years) and resulted in the final disappearance of Christianity and Latin in the 12th or 13th centuries. The majority of the population were not Muslim until quite late in the 9th century; a vast majority were during the 10th. Also, some Tunisian Christians emigrated; some richer members of society did so after the conquest in 698 and others were welcomed by Norman rulers to Sicily or Italy in the 11th and 12th centuries – the logical 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-Abassiya (809) and Raqadda (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 1230 when the son of Abu Hafs declared himself independent. During the reign of the Hafsid dynasty, fruitful commercial relationships were established with several Christian Mediterranean states. In the late 16th century the coast became a pirate stronghold.
caption: Domes of the Great Mosque of Kairouan. Founded in 670, it dates in its present form largely from the Aghlabid period (9th century). It is the oldest mosque in the Maghreb.
exif: {"Image Make": "Panasonic", "Image Model": "DMC-TZ1", "Image Orientation": "Horizontal (normal)", "Image XResolution": "72", "Image YResolution": "72", "Image ResolutionUnit": "Pixels/Inch", "Image Software": "Ver.1.0", "Image DateTime": "2007:10:15 17:14:10", "Image YCbCrPositioning": "Co-sited", "Image ExifOffset": "418", "Image PrintIM": "[80, 114, 105, 110, 116, 73, 77, 0, 48, 50, 53, 48, 0, 0, 14, 0, 1, 0, 22, 0, ... ]", "Thumbnail Compression": "JPEG (old-style)", "Thumbnail Orientation": "Horizontal (normal)", "Thumbnail XResolution": "72", "Thumbnail YResolution": "72", "Thumbnail ResolutionUnit": "Pixels/Inch", "Thumbnail JPEGInterchangeFormat": "7060", "Thumbnail JPEGInterchangeFormatLength": "7033", "Thumbnail YCbCrPositioning": "Co-sited", "EXIF ExposureTime": "1/500", "EXIF FNumber": "63/10", "EXIF ExposureProgram": "Program Normal", "EXIF ISOSpeedRatings": "80", "EXIF ExifVersion": "0220", "EXIF DateTimeOriginal": "2007:10:15 17:14:10", "EXIF DateTimeDigitized": "2007:10:15 17:14:10", "EXIF ComponentsConfiguration": "YCbCr", "EXIF CompressedBitsPerPixel": "4", "EXIF ExposureBiasValue": "0", "EXIF MaxApertureValue": "3", "EXIF MeteringMode": "Pattern", "EXIF LightSource": "Unknown", "EXIF Flash": "Flash did not fire, auto mode", "EXIF FocalLength": "21/2", "EXIF FlashPixVersion": "0100", "EXIF ColorSpace": "sRGB", "EXIF ExifImageWidth": "2560", "EXIF ExifImageLength": "1920", "Interoperability InteroperabilityIndex": "R98", "Interoperability InteroperabilityVersion": "[48, 49, 48, 48]", "EXIF InteroperabilityOffset": "6908", "EXIF SensingMethod": "One-chip color area", "EXIF FileSource": "Digital Camera", "EXIF SceneType": "Directly Photographed", "EXIF CustomRendered": "Normal", "EXIF ExposureMode": "Auto Exposure", "EXIF WhiteBalance": "Auto", "EXIF DigitalZoomRatio": "0", "EXIF FocalLengthIn35mmFilm": "71", "EXIF SceneCaptureType": "Standard", "EXIF GainControl": "None", "EXIF Contrast": "Normal", "EXIF Saturation": "Normal", "EXIF Sharpness": "Normal"}