Qayrawan

القيروان

Qayrawan is a town in central Tunisia that began as an Arab military base, traditionally founded by Uqba ibn Nafi' in 50/670, and became the capital of Ifriqiya and the oldest and most prestigious Muslim city of the Islamic West. It peaked under the Aghlabids, with its Great Mosque and a school of Maliki law that includes Sahnun's Mudawwana among its landmarks. It declined sharply after the Fatimid move to Cairo and the Banu Hilal invasion in the mid-5th/11th century, and remained a revered town.

DraftWritten with AI help from the sources it cites, and not yet read by a human editor.

Depth

At a glance

Era
The Umayyad Period
Region
Maghreb
Identifiers
WikidataGeoNamesidaialthurayya

Overview

Al-Qayrawan is a town in central Tunisia, 156 km from Tunis and 57 km from Sousse, at an altitude of 60 m. 1 It began as a military base and became the capital of Ifriqiya, the oldest and most prestigious Muslim city of the Islamic West, and a leading centre of learning, above all of Maliki law. The Encyclopaedia of Islam article describes a city that reached its peak in the 3rd/9th and 4th/10th centuries, declined sharply after the middle of the 5th/11th century, and has remained a revered town ever since. 2 3

Why the town stands where it does

The article explains the origin of al-Qayrawan by the lie of the land. The early Arab invasions avoided the coast, which was dangerous for forces not yet experienced at sea, and the western mountains, which suited ambushes. They therefore used the corridor leading to the region of Qammuniya, which is the corridor of al-Qayrawan. 4 Tradition credits the foundation to Uqba ibn Nafi, but the article says it came about by stages and that several commanders contributed. 4

After the battle of Sufetula in 27/647-8, the forces of Abd Allah ibn Sa'd ibn Abi Sarh may have raided as far as the region, and a mosque in the town is said to commemorate his sea journey. Later Mu'awiya ibn Hudayj led three campaigns, in 34/654-5, 41/661-2 and 45/665, each ending near Qammuniya, where he set up a garrison camp at a hill called al-Karn. The sources describe it as a town he laid out before Uqba, and the name was drawn from the relief, probably the hill now called Batn al-Karn, 12 km north-west of the present town. 4 5

Uqba's foundation and its first setbacks

In 50/670 the founder of the Umayyad dynasty took Ifriqiya from Ibn Hudayj and gave it to Uqba, who was not pleased with the earlier camp. The sources, with details bordering on the miraculous, tell how he and many Companions chose a new site on a plain covered with vegetation and haunted by reptiles and wild beasts. He built a mosque and a government house facing each other and spent his first five years as governor watching over the work. 5 His successor Abu al-Muhajir Dinar disliked settling there; he is said to have burned the foundations and moved the capital about two miles towards Tunis, to a Berber district, naming it Takirwan. The article reads this as part of a policy of rapprochement with local leaders, which displeased the caliphate. When Uqba returned in 62/682 he restored the capital to his first site, and it did not move again. 5

The article holds that the place had been a Roman or Byzantine town, called Kuniya or Qammuniya in the sources, whose ruins supplied the first builders; it points to reused materials in monuments and houses, to the nearby place al-Asnam, "the Idols", and to al-Bakri's note that the Mint Market stood on a church. 5 On the choice of site, Ibn Khaldun judged the Arabs poor town planners, and later authors repeat this; the article answers that the land was less steppe-like then, with olive forest, silt from the Merguellil and Zeroud wadis, and a Roman water system, called Qasr al-Ma', that the Arabs revived. 5 6

Uqba was killed at Tahuda, and the town was evacuated. The Berber Kusayla took it as the capital of a short-lived kingdom, 64-9/684-9, until Hassan ibn al-Nu'man and others recovered it. 6

Sieges, walls and the Aghlabid period

In 124/742 Kharijite waves threatened the city, but two victories at al-Karn and al-Asnam saved it. In 140/757-8 the Warfajuma Kharijites seized it and held it for over a year, massacring its Qurashi element, until the Ibadi Abu al-Khattab freed it, leaving Abd al-Rahman ibn Rustam as governor. In 144/761 Muhammad ibn al-Ash'ath brought it back under the east and gave it its first wall for the caliph al-Mansur, built between 144/762 and 146/763. 6 A coalition of Sufri and Ibadi Berbers stormed it in 154/771, after the inhabitants had been reduced to eating their animals; Yazid ibn Hatim then took it in hand from 155/772. The article says he organised the markets and drew poets and scholars to the city. 6 7

Under the Aghlabids the city became the capital of an independent kingdom. Soldiers' revolts made it a stake in rebellions: Ibrahim I had the ramparts removed in 194/810, and after the people opened the gates to a rebel in 209/824, Ziyadat Allah I razed the walls to the ground. 6 The princes lived in fortified residences nearby, al-Abbasiyya from 184/800 and Raqqada from 263/877. 7 The article calls the 3rd/9th century the zenith: al-Bakri speaks of a main street of about 4 km, 48 baths and, one Ashura, 950 slaughtered oxen, from which the article infers a population of several hundred thousand while allowing that the figures may be exaggerated. 7 Al-Ya'qubi lists Arabs from several tribes, Persians from Khurasan and Berbers, with Jews and Christians alongside the Muslim majority; a church was authorised there in 177-8/793-4, and Christians kept Latin in funerary inscriptions until the 5th/11th century. 7 Fourteen large cisterns served the growing population, the grandest at the Tunis Gate, built in 242-9/856-63. 7

The Great Mosque and other monuments

The Great Mosque, the oldest and most prestigious religious building of the Muslim West, took its form in the 3rd/9th century. The article lists renovation by Hassan ibn al-Nu'man, a minaret probably from the time of Hisham ibn Abd al-Malik, reconstruction by Yazid ibn Hatim in 157/774, complete demolition and rebuilding by Ziyadat Allah in 221/836, and enlargement in 248/862-3. It keeps Uqba's qibla line, which deviates 31 degrees towards the south. The Zirid al-Mu'izz ibn Badis gave it the present maqsura, and the last restoration was in 1970-2. 7 See the Great Mosque of Qayrawan. Among other monuments the article names the Mosque of the Three Doors, founded in 252/866 by the Andalusian Muhammad ibn Khayrun, whose facade it calls a fine example of Aghlabid architecture, and the Aghlabid cistern at the Tunis Gate. 4

A centre of learning

The article cites a saying that Malik counted al-Qayrawan with Kufa and Medina as one of three great capitals of the Muslim sciences. 7 Yahya ibn Sallam taught his Qur'anic commentary there. Asad ibn al-Furat left the Asadiyya, a synthesis of what he learned from Malik and eastern masters, but his standing was eclipsed by Sahnun, whose Mudawwana, conveying Malik's teaching in the version of Ibn al-Qasim, became the breviary of the city. Students came from afar, including 57 from al-Andalus who were authorised to teach it. 7 Medicine was represented by Ziyad ibn Khalfun, Ishaq ibn Imran and Ishaq ibn Sulayman, whose works were translated into Latin by Constantine the African and taught at Salerno. 7 3 Later names include the jurists Ibn Abi Zayd and al-Qabisi, the physician Ibn al-Jazzar and the poet Ibn Rashiq. 3

Fatimids, Zirids and the Banu Hilal

The article presents the Fatimids as unwelcome rulers of what it calls a citadel of Sunnism. The city suffered little from the Kutama troops and kept its prosperity beside the rival city of Sabra al-Mansuriyya, founded in 336/947-8, and it survived an earthquake, a fire, a flood and a famine. 3 The article adds that its people backed the Kharijite rebel Abu Yazid in 332-6/943-7, were deceived by him and abandoned him, and were punished by al-Mansur once the rebel was killed. 6 Al-Muqaddasi saw fifteen main streets and a boundary of about 5.5 km, which the article takes as the peak of expansion. 3

Decline followed. The transfer of the caliphate to Cairo in 361/972 cost the city its role as a capital, and an official took 400,000 dinars from 600 leading citizens in 366/976-7. A famine and epidemic struck in 395/1004-5, and the article reckons the city had shrunk to about a third of its area at the zenith. 3 Under the Zirids, riots in 407/1016-17 killed those suspected of Shi'i leanings and were answered with brutal reprisals. 6 The Banu Hilal besieged the city from 446/1054; al-Mu'izz withdrew to al-Mahdiyya in 449/1057, and the nomads pillaged it, an event the article calls the final blow. 6 3 Ibn Rashiq wrote an elegy for it. By the middle of the 6th/12th century al-Idrisi found it largely in ruins and held by Arab nomads. 3

From the Hafsids to the protectorate

Under the Almohads and especially the Hafsids it gained a little peace, better ramparts and many zawiyas, but became chiefly a market town for the Bedouin. 3 8 Leo Africanus in 1516 saw mostly poor tanners; in the 18th century visitors ranked it second only to Tunis. 8 After 1535 it became the capital of a principality under the marabout Sidi Arafa until the ra'is Dragut, advancing from Tripoli, took it on 3 January 1558. 2 In 1881 a conference in the Great Mosque called for resistance to the French protectorate, and the town was occupied without resistance on 26 October 1881. 2

The town today

The article records a population of 56,000 in 1972 and a governorate whose economy rests on olives, almonds and cereals, with hand-made long-wool carpets as the town's reputation. 4 In the 19th century it was thought of as the spiritual capital of Tunisia and closed in principle to non-Muslims; by the article's date tourists could enter its sanctuaries freely, while it kept an aura of sanctity. 8

Al-Muqaddasi's description

Al-Muqaddasi saw its congregational mosque around the year 375 AH, and counted it greater than the mosque of Ibn Tulun, paved with marble, with its gutters of lead. The city has fifteen lanes, among them the Lane of al-Rabi', the Lane of Tunis and the Lane of Nafi'. 9

Other early accounts

Al-Baladhuri relates that its site was a thicket of trees and tamarisk, which wild beasts, snakes and deadly scorpions made impassable. Uqba prayed to his Lord, and all of that vanished. Then he built, and the people built houses and dwellings with him, and he built its congregational mosque. He had seen in a dream a man calling the adhan in the place of the minaret, so he built the minarets on the spot where the man had stood. 10 See The founding of al-Qayrawan. Muhammad ibn al-Ash'ath al-Khuza'i repaired the city and its mosque during his governorship for Abu al-Abbas. 10

Golius is reported to say that Mu'awiya ibn Abi Sufyan sent ten thousand fighters who conquered Africa in 40 AH, and that the Arab troops built al-Qayrawan thirty-three leagues from Carthage. 11 The same source says the name is Persian, from "karwan", a caravan, as Arab philologists hold. 12 It adds that the Aghlabid state arose at al-Qayrawan and power then passed to Raqqada and, under the Fatimids, to al-Mahdiyya. 13

Connections

Explore the connections

Ruled by
Abd al-Rahman ibn Rustam, the Imam· Abu Yazid Makhlad· Musa ibn Abi al-Afiya
Home of
Al-Shabibi (Abd Allah ibn Muhammad ibn Yusuf)· Abu al-Arab al-Tamimi, Muhammad ibn Ahmad· Hululu al-Qarawi, Ahmad ibn Abd al-Rahman· Ibn al-Jazzar, Ahmad ibn Ibrahim· Ibn al-Labbad· Ibn Bariq Abu Hafs· Ibn Rashiq al-Qayrawani· Ibrahim ibn Hasan ibn Ishaq al-Tunisi, Abu Ishaq· Khalil al-Fatimi· Makki ibn Abi Talib· Maysur al-Fatimi· Mohamed Lasram· Muhammad ibn al-Harith al-Khushani· Qasim ibn Isa ibn Naji· Sahnun ibn Said al-Tanukhi· Yahya ibn Omar al-Kinani· Ziyad ibn Khalfun
Place of death of
Abdallah ibn Musa ibn Nusayr· Al-Husayn I ibn Ali· Ibn Abi Zayd al-Qayrawani· Ibrahim ibn al-Aghab· Ruh ibn Hatim al-Muhallabi· Ziyadat Allah I of Ifriqiya
Birthplace of
Al-Barzali, Abu al-Qasim ibn Ahmad· Fatima al-Fihri· Habiba Ghribi· Ibn Abi Zayd al-Qayrawani· Mohamed Ennakhli· Sahnun ibn Said al-Tanukhi
Under the rule of
Muhammad ibn al-Ash'ath al-Khuza'i· Musa ibn Abi al-Afiya· Yahya ibn Ibrahim al-Guddali
Site of
Battle of al-Musalla· Battle of Al-Qarn (1160)· Battle of Fajj al-Naam (1318)· Battle of Kairouan (1053)· Battle of Kairouan (1348)· al-Aghlab ibn Salim's Death by an Arrow and Harish's Rout· Fall of Kairouan (909)· The Founding of Qayrawan· The Ifriqiyan Army's Rising against Ibn al-Ash'ath in His Palace· Ibrahim ibn al-Aghlab's Founding of al-Abbasiyya· The Kairouan disaster· Kairouan incident against the Rafida under al-Mu'izz ibn Badis
Contains
Great Mosque of Qayrawan
Related to
The Blue Qur'an· How Arabic spread after the conquests· The Arabisation of the Maghrib
Origin of
Mushaf al-Hadina ("Nurse's Qur'an"), Qayrawan, ca. 1019–21

People and things also explored

Ifriqiya· Ibrahim ibn al-Aghab· Muhammad ibn al-Ash'ath al-Khuza'i· The history of Arabic, from the inscriptions to Modern Standard Arabic· Arabic· al-Hakim bi-Amr Allah II Ahmad ibn al-Mustakfi· Uqba ibn Nafi' al-Fihri· Tunis

Explore the timeline

Sources

  1. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 4 p. 862
  2. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 4 p. 866
  3. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 4 p. 868
  4. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 4 p. 863
  5. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 4 p. 864
  6. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 4 p. 865
  7. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 4 p. 867
  8. Encyclopaedia of Islam, 2nd edition (Leiden: Brill, 1954–2008), 13 volumes , vol. 4 p. 869
  9. Ahsan al-Taqasim fi Ma'rifat al-Aqalim of al-Muqaddasi , pp.180-181
  10. Futuh al-Buldan — al-Baladhuri (Mu'assasat al-Ma'arif edition)
  11. al-Farghani, Elementa astronomica (Golius, Amsterdam 1669) , p. 405
  12. al-Farghani, Elementa astronomica (Golius, Amsterdam 1669) , p. 407
  13. al-Farghani, Elementa astronomica (Golius, Amsterdam 1669) , p. 406
  • Muhammad Qabbani, The Umayyad State from Birth to Fall (Damascus: Dar Wahy al-Qalam, 2006)
  • Nomisma.org (Linked Open Data ontology for numismatic concepts)
  • iDAI.gazetteer (German Archaeological Institute place gazetteer)
  • al-Ṯurayyā Gazetteer (al-Thurayya, Leipzig)
Cite this page

islam.museum contributors. “Qayrawan”. islam.museum, https://islam.museum/en/place/qayrawan/. CC BY-SA 4.0. Last updated 2026-11-23.

Improve this page on GitHub · Report an error · Help complete it · JSON

Wing

Place

Cities, sites and routes on a map that moves through time.
Related

Ifriqiya

Ifriqiya, the Maghreb province between Tripoli and Tangier; Ibn al-Kalbi says Ifriqis ibn Qays ibn Sayfi al-Himyari held it in the Jahiliyya and it was named for him — he killed its king Jurjir and said of the Barabira 'how barbarous these folk', whence they were called al-Barabira; Abdallah ibn Sa'd ibn Abi Sarh raided it under Uthman, killed its patrikios at Sbejtla and took its grandees' three hundred qintar of gold, then Uqba ibn Nafi' opened it and laid out its Qayrawan.