Rebel lordship · The Maghreb and the Sahara · as at first light, 1 January 1200

Mahdia under the rebel al-Ragragi

Since the summer of 1199 the old Fatimid capital of Mahdia, a walled peninsula with a fortified harbour, has been the lordship of a rebel Almohad soldier, Muhammad ibn Abd al-Karim al-Ragragi.

A man of the caliph's own Kumiya tribe born in Mahdia, he won a name fighting the Arab nomads who raided the Sahel, refused to hand half his booty to the governor, broke out of prison, seized the governor and took the title al-Mutawakkil. He fights everyone: the Almohad governor of Tunis, whom he will besiege from La Goulette in 596, and Yahya ibn Ghaniya, whom he will besiege in Gabes. His power is the town, its walls and harbour, its militia and the villages of the Sahel round it.

Who rules

Name
Muhammad ibn Abd al-Karim al-Ragragi (al-Rajraji)
Title
Self-styled ruler of Mahdia with the title al-Mutawakkil 'ala Allah ('he who relies on God'); Ibn Khaldun's Almohad chapter says he also took the style of shaykh
Since
595 AH; Arabic Wikipedia gives Sha'ban 595 (about 29 May to 26 June 1199, counting from 1 Muharram 595 = about 3 November 1198)
Born
Not pinned; born at Mahdia (Ibn Khaldun)
Family
A son, called Abd Allah in one modern account, who negotiates the surrender of Mahdia in 597 and is drowned off Collo (al-Qull) soon after. Other family not known.
Confidence
high

Ibn Khaldun (vol. 2, p. 106): of the Kumiya tribe (the caliph's own tribe), born at Mahdia, a soldier of the paid army (jund), who made his name leading a band against Arab raiders; when the governor of Mahdia, Abu Ali Yunus, brother of the governor of Ifriqiya Abu Sa'id ibn Abi Hafs, demanded half his booty and jailed him, he broke out, seized the governor, released him for a ransom paid by Abu Sa'id, and declared Mahdia independent in 595.

Overlord

None. He threw off the Almohad caliph; one modern article says he sought recognition from the Abbasid caliph (not verified).

What the realm holds

  • Mahdia: the walled peninsula city, its Fatimid harbour and arsenal
  • The villages of the Mahdia Sahel (Ksour Essaf, Bekalta, Moknine, Teboulba): probable
  • Monastir and Sousse: not pinned (between the rebel and the Almohads)

How it was acquired

By revolt in 595 AH (mid-1199), seizing the Almohad governor Abu Ali Yunus ibn Abi Hafs. Almohad officers sent to replace him were attacked on landing (Arabic Wikipedia).

Allies and rivals

Rivals: the Almohad governor at Tunis (Abu Sa'id ibn Abi Hafs, then the sayyid Abu Zayd); Yahya ibn Ghaniya; the Arab nomads of the Sahel. Allies: none known; the townsmen of Mahdia and his soldiers.

The realm that morning

He holds Mahdia firmly and is at war with the Almohads of Tunis; his siege of Tunis falls in 596 AH (from 22 October 1199), so it may be under way, or about to begin, on 1 January 1200 (not pinned). He is not yet at war with Yahya.

Wealth

The port and its trade, the olive villages of the Sahel, booty taken from the Arabs, and the treasure of the Almohad governor.

Military

The walls and harbour of Mahdia, among the strongest in Ifriqiya; the town militia and the paid soldiers who followed him; ships able to carry troops to Tunis by sea in 596. No numbers.

Threats

  • The Almohad governor of Tunis and a relief fleet from the west
  • Yahya ibn Ghaniya
  • Arab raids on the Sahel villages

What the year holds

What happened next, if nothing in play changes it. Each event carries what it depends on and what would stop it.

In 1200

  1. 596 AH (22 October 1199 to 10 October 1200), month not pinnedHe besieges Tunis from a camp at La Goulette (Halq al-Wadi), by land and sea; the governor Abu Zayd beats him off with a sortie by land and sea and he withdraws, plundering the villages.Depends on: Tunis's garrison holding; his ships. Stopped by: Tunis falling to him (unlikely), or an Almohad fleet arriving first.
  2. 597 AH (11 October 1200 to 29 September 1201)Blockaded by land and by two warships the governor of Tunis lends Yahya, he surrenders Mahdia on a promise of safety, is jailed and dies soon after; his son is drowned off Collo.Depends on: The siege lasting; Tunis helping Yahya. Stopped by: Relief from the Almohads or a break between Yahya and Tunis.

Later, on the likely course

  1. 596-597 AH, after the siege of TunisHe besieges Yahya ibn Ghaniya in Gabes, lifts the siege, marches on Gafsa, is routed by Yahya at Qusur Lalla near Gafsa and falls back to Mahdia, where Yahya besieges him.Depends on: His decision to turn on the Banu Ghaniya. Stopped by: A peace with Yahya.

Places of note

  • Mahdia, the rebel's city: Walled Fatimid capital on its peninsula.
  • La Goulette (Halq al-Wadi): his camp before Tunis in 596: The channel between the lake of Tunis and the sea.

Where the sources disagree

  • The governor he seized: Ibn Khaldun and the Tikrit article name Abu Ali Yunus, brother of Abu Sa'id ibn Abi Hafs; Arabic Wikipedia says he imprisoned 'the governor Abu Sa'id'. We follow Ibn Khaldun.
  • His tribe: Ibn Khaldun says the Kumiya; Arabic Wikipedia calls him a Kutama Berber; his name al-Ragragi points to the Ragraga of the Atlantic coast. Not settled.
  • The Tikrit article says the Abbasid caliph 'al-Mustadi' wrote to recognize him; al-Mustadi died in 1180, so this cannot be right as it stands.
  • The brief asked whether the revolt is 595 or 596: it is 595 (mid-1199), before 1 January 1200; the siege of Tunis is 596, which may fall on either side of that date.

Evidence: Ibn Khaldun gives the story with years; Arabic Wikipedia gives the month of the revolt; the month of the siege of Tunis is not given.

On the map: The rebel's ground beyond the walls of Mahdia is not documented; the Sahel villages are drawn as probable.

Primary sources for this realm

Chronicles, registers, sagas and inscriptions written in or near 1200 that cover this entry. Each has its own page with editions, translations and where to read it.

  • History of the Two Dynasties, the Almohad and the Hafsid, al-Zarkashi (Muhammad ibn Ibrahim al-Lu'lu'i al-Zarkashi) (about 1490 to 1495, at Tunis). A short Hafsid-era chronicle whose Almohad opening gives, in a few lines a reign, the succession of al-Mansur and al-Nasir, the Banu Ghaniya's seizure of Ifriqiya and its recovery, and the sending of Abd al-Wahid ibn Abi Hafs to Tunis, which the Hafsids counted as the start of their house. Read online
  • The Complete History: the passages on the Maghreb and al-Andalus, Ibn al-Athir (about 1220 to 1231, at Mosul). The year entries for 595 to 597 of the Hijra (late 1198 to 1201) record the death of Yaqub al-Mansur, the accession of al-Nasir and the opening of Yahya ibn Ghaniya's war in Ifriqiya; the following years follow Yahya and the Ghuzz captain Qaraqush through Tripoli, Gabès and Mahdia to al-Nasir's reconquest in 1206, with the best eastern account of Qaraqush's career. Read online
  • The Wondrous Account of the History of al-Andalus and the Maghreb, Ibn Idhari al-Marrakushi (about 1312, at Marrakesh). The Almohad section is the fullest year-by-year narrative of the caliphate around 1200: the last campaigns and the death of Abu Yusuf Yaqub al-Mansur in January 1199, the accession of his son Muhammad al-Nasir, the renewed war of the Banu Ghaniya in Ifriqiya under Yahya ibn Ishaq and his ally Qaraqush, the Almohad losses of Mahdia and Tunis a few years later, and al-Nasir's reconquest of Ifriqiya in 1205 to 1206 followed by the appointment of Abd al-Wahid ibn Abi Hafs as governor. Read online
  • The Book of Examples: the History of the Berbers and of the Muslim Dynasties of North Africa, Ibn Khaldun (1375 to 1379 at Qal'at Ibn Salama and Tunis, revised until 1406). Ibn Khaldun's tribal histories are the standard account of the powers that Almohad chronicles treat as background: the Banu Hilal and Banu Sulaym in Ifriqiya and Tripolitania and their alliances with the Banu Ghaniya and Qaraqush; the Zenata of the central Maghreb (Banu Marin, Banu Abd al-Wad, Tujin, Maghrawa) before their rise; the Sanhaja and the veiled peoples of the Sahara; the Masmuda and the Almohad tribes. Read online
  • The Pleasant Book: a Summary of the History of the Maghreb, Abd al-Wahid al-Marrakushi (completed in 1224, in the East, after the author left the Maghreb in 1217). Abd al-Wahid was a boy of fifteen at Fez and Marrakesh in 1200 and later moved in Almohad court circles, so his account of Yaqub al-Mansur (died January 1199) and of the first years of Muhammad al-Nasir is partly from memory and from men he knew: the character of the new caliph, the weakness that let the Banu Ghaniya overrun Ifriqiya, the Majorca expedition of 1203 and the Ifriqiya campaign of 1205 to 1206. Read online
  • Official Letters of the Almohad Chancery (1140s to 1260s; the letters nearest 1200 are of the reigns of al-Mansur and al-Nasir). Circular letters from the caliphs to governors, tribes and towns announcing victories, appointments and policy, preserved in later manuscript collections.
  • The Cairo Geniza Documents (about 950 to 1250 for the bulk of the historical documents). Letters, court records, accounts and lists from the Ben Ezra synagogue in Fustat that show the working of the trade that bound Egypt to Ifriqiya, Sicily, al-Andalus, Aden and India. Read online
  • Dictionary of Countries: the entries on Africa, Yaqut al-Hamawi (1224 to 1228, at Mosul and Aleppo). Entries written within a generation of 1200 from earlier books and from informants: Maqdishu (Mogadishu), described as a town of the Barbar (Somali) on the edge of the Zanj country with no single ruler but elders for each group, the earliest notice of the town; Manbasa (Mombasa), Lanjuya (Zanzibar) and the Zanj coast; Zayla, Barbara and the Dahlak islands; Dunqula (Dongola) and the Nubians; the Beja; Kanem, Zaghawa, Ghana, Kawkaw and the Sudan, mostly from al-Bakri and al-Idrisi; and the towns of Ifriqiya and the Maghreb. Read online
  • The Book of Examination of the Wonders of the Cities (1191). The nearest geographical survey to 1200: a description of the Almohad lands written nine years earlier, town by town, from Alexandria and Barqa through Tripoli, Gabès, Mahdia, Tunis, Bougie, Tlemcen, Fez, Marrakesh and Sijilmasa, with a section on the Sahara routes and the Sudan (Ghana, Zafun, Kawkaw). Read online
  • The Journey of al-Tijani, Abd Allah ibn Muhammad al-Tijani (after 1309 and before 1318, at Tunis). A Hafsid chancery official's travel book, which at each town stops to tell its history, and so preserves accounts of the Banu Ghaniya war and of Qaraqush in southern Ifriqiya and Tripolitania around 1200 (Gabès, Djerba, Tripoli, the Jarid oases) from lost Almohad-period sources. Read online
  • The Pleasure of One who Longs to Cross the Horizons (the Book of Roger), al-Idrisi (Muhammad ibn Muhammad al-Sharif al-Idrisi) (completed in 1154 at Palermo, for Roger II of Sicily). The fullest geography of Africa a generation before 1200: the Maghreb and Ifriqiya town by town with distances and products; the Sahara routes through Sijilmasa, Awdaghust, Ghadames and Zawila; the Sudan with Ghana, Takrur, Sila, Barisa, Kawkaw (Gao) and Kugha, and Kanem with its towns Manan and Njimi; Nubia and Dongola, the Beja and the Red Sea ports; Zeila and Berbera; and the Zanj coast with Malindi, Mombasa, Qanbalu and Sofala with its gold, the earliest systematic notice of the Swahili towns. Read online

Sources and studies

  1. Ibn Khaldun, Histoire des Berberes, tr. de Slane, vol. 2 (1854): the Banu Ghaniya and Qaraqush (pp. 100-111), the Almohads (pp. 224-228), the Hafsids (pp. 291-293); read through the archive.org full-text search
  2. Arabic Wikipedia, Banu Ghaniya (after Ibn al-Athir, al-Tijani, Ibn Idhari, Ibn Khaldun, Bel 1903): Mahdia seized in Sha'ban 595; battle near Gafsa 597; Tunis entered 7 Rabi II 600 (15 December 1203)
  3. Arabic article on the revolts against the Almohads, Journal of Tikrit University for the Humanities (after Ibn Khaldun, Ibn Idhari, al-Zarkashi): the Mahdia revolt of 595, the siege of Tunis in 596, the siege of Mahdia in 597
  4. Chronique des Almohades et des Hafcides attribuee a Zerkechi, tr. E. Fagnan (1895), pp. 11-13 of the text (Abu Zayd governor of Ifriqiya from 584/1188; Mahdia surrendered 9 January 1206)

Last revised 4 November 2026. Published 4 November 2026. Suggest a correction on the OMNIA Discord.