Kairouan is the spiritual soul of Tunisia. Founded in 670 by the Arab general Uqba ibn Nafi, it was the first great Muslim city in North Africa and has been the holiest city in the country ever since, considered the fourth city of Islam after Mecca, Medina and Jerusalem. According to a deep-rooted tradition, seven pilgrimages to Kairouan were equivalent to one to Mecca for those who could not make the long journey to Arabia. Stepping into its medina means entering the religious and historical heart of the Maghreb.
Its supreme monument is the Great Mosque of Uqba, one of the oldest and most influential mosques in the Islamic world and the model that all later mosques in the Maghreb drew on. With its enormous courtyard, its forest of reused Roman columns and its massive minaret —perhaps the oldest still standing—, it is a building that impresses with its austerity and strength. Around it, the medina unfolds in white alleyways, carpet souks, saints' mausoleums and the aroma of makroudh, the date pastries that made the city famous.
This guide covers Kairouan with a practical and respectful eye: what to see without missing anything (the Great Mosque, the Aghlabid Basins, the Zaouia of Sidi Sahab, the souks), how to get there from the coast or the capital, how much the combined monument ticket costs, how to dress to enter places of worship and when to go. Whether you are drawn by Islamic history or looking for the most authentic and traditional Tunisia, far from the beaches, Kairouan will leave its mark on you: it is a journey to the very origins of Arab and Muslim Tunisia.
Kairouan began as a military camp in 670, when the Arab general Uqba ibn Nafi, in the midst of the conquest of North Africa, chose this inland spot to found a permanent base from which to bring Islam to the Maghreb. Around the mosque he built grew the first great Muslim city in the region. After overcoming Berber resistance —led by the legendary queen Al-Kahina— and internal struggles, Kairouan became established as the capital of the province (Ifriqiya) and reached its peak in the 9th century under the Aghlabid dynasty, who rebuilt the Great Mosque in its current form and gave the city its famous basins and a brilliant intellectual and religious life. It was also the cradle of the Fatimids in the 10th century. Although the political capital later moved to Mahdia and Tunis, and the city suffered the devastating invasion of the Banu Hilal tribes in 1057, Kairouan kept its prestige as the main holy city of the Maghreb. Unesco declared it a World Heritage Site in 1988. The full story is on our history page.
Read the full history ↓The deep Tunisia of the northwest and centre: Dougga, the best-preserved Roman city in Africa set among wheat-covered hills, and Kairouan, the fourth holy city of Islam and the cradle of the faith in the Maghreb, with its thousand-year-old great mosque.
Read the history of The interior and its Roman heritage →They depart from Monastir, 67 km away. If you book from this link we earn a commission and you pay no more.
No exact prices: a scale from $ (budget) to $$$$$ (luxury), with 2-3 options per category.
Origins, formation and what the sources say.
The story of Kairouan begins with a deliberate act of foundation, right in the middle of the expansion of Islam. Around the year 670 (year 50 of the Hijra), the Arab general Uqba ibn Nafi, leading the armies of the Umayyad Caliphate as they pushed west conquering North Africa, decided the campaign needed a permanent base, a garrison city from which to control the region and spread the new faith. He chose a spot inland, away from the coast —where the Byzantine fleet was still a threat— and from the mountains where the Berbers held out.
The site was a semi-arid plain which, according to the chronicles, was covered in scrub and was a lair for wild beasts and reptiles. The word 'qayrawan' itself, of Persian origin, means 'camp' or 'military caravan', and it describes well what Kairouan was at the start: a fortified camp of the conquering army. Uqba laid out the city and, at its centre, built the first version of what would become its Great Mosque, the religious core around which everything else would grow.
The figure of Uqba ibn Nafi became bound to the city forever: his tomb is venerated and the Great Mosque bears his name (Mosque of Sidi Uqba). His founding of Kairouan was hugely significant, because it created the first great urban centre of Islam in North Africa, the bridgehead from which Arab-Islamic religion and culture would spread across the whole Maghreb and, later, into the Iberian Peninsula. Kairouan was born, then, as the gateway of Islam to the western world.
The conquest of North Africa was neither quick nor peaceful, and in its first decades Kairouan lived through the ups and downs of that struggle. The Berber peoples who inhabited the region put up fierce resistance to the Arab invaders. Uqba ibn Nafi himself, after a legendary expedition that tradition says took him as far as the Atlantic, died in 683 in an ambush set by the Berber leader Kusayla, who even managed to seize Kairouan for a time.
The most famous resistance was that of a figure wrapped in legend: Al-Kahina (Dihya), a Berber warrior queen who at the end of the 7th century united several tribes and managed for a while to halt the Muslim advance, inflicting defeats on the Arab armies. Part history and part myth, she became a symbol of North Africa's native resistance. But she was finally defeated around 701-702, and her defeat cleared the way for definitive Muslim rule over the region.
Once the early resistance was overcome, Kairouan established itself as the capital of Ifriqiya, the Arabic name for the province covering present-day Tunisia and neighbouring areas, governed by emirs on behalf of the caliphate. Many Berbers converted to Islam and joined the armies, and from Kairouan would set out the expeditions that in 711 crossed the strait to conquer Hispania. The city became a hive of military, commercial and religious life, laying the groundwork for the splendour still to come.
Kairouan reached its peak in the 9th century, under the Aghlabid dynasty, a family that ruled Ifriqiya almost independently on behalf of the distant Abbasid Caliphate of Baghdad. Under the Aghlabids, Kairouan became one of the great capitals of the Islamic world, a centre of power, wealth and culture that rivalled the leading cities of its time.
We owe the Great Mosque as we know it today to this dynasty: the Aghlabids rebuilt and enlarged it almost entirely in the 9th century, giving it its monumental courtyard, its forest of reused Roman columns, its massive minaret and its great dome, setting an architectural model that every mosque in the Maghreb and al-Andalus would imitate. They also built the famous basins or cisterns, an extraordinary feat of hydraulic engineering that brought in and stored water to supply the growing population of a city sitting in the dry interior.
But Kairouan wasn't just stone and water: above all it was a great intellectual and religious centre. Around the Great Mosque flourished a university and a school of law and theology of enormous prestige, where Islamic law (the Maliki school, dominant in the Maghreb), theology, language, medicine and the sciences were taught. Scholars such as the jurist Sahnun spread an influence from Kairouan that reached across the entire Muslim West. For generations the city was the cultural beacon of the Maghreb, a place of pilgrimage and learning that earned its place as the fourth holy city of Islam.
At the start of the 10th century, Kairouan was the stage for an event of historic reach: the birth of the Fatimid Caliphate. The Fatimids, a Shia dynasty that claimed descent from Fatima, the Prophet's daughter, took power in Ifriqiya in 909 and challenged the Sunni caliphs of Baghdad and Córdoba. Although they set up their capital in the new city of Mahdia, on the coast, and would later move their seat of power to Egypt —where they founded Cairo—, their origins are tied to the Kairouan region, which lived through the religious tensions between the Shiism of the new rulers and the Sunni majority of the population.
After the Fatimids left for Egypt, the Berber Zirid dynasty governed Ifriqiya in their name. In the mid-11th century, the Zirids broke with the Fatimids and returned to Sunni allegiance to Baghdad. Cairo's response was terrible: the Fatimids unleashed the nomadic Arab tribes of the Banu Hilal on Ifriqiya, in what is known as the Hilalian invasion. Around 1057, these tribes overran Kairouan, sacked the city and laid waste to the countryside, in a catastrophe from which the city would never fully recover.
The Hilalian invasion marked the end of Kairouan as a great political and economic capital. The seat of power moved for good towards the coast and, later, to Tunis, which would from then on be the country's capital. Kairouan was left smaller, poorer and partly depopulated. Yet neither the sack nor the loss of power could take away what mattered most: its sacred aura. The city kept its religious prestige as the foremost holy city of the Maghreb, and pilgrims and the devout kept making their way there over the following centuries.
After its medieval fall, Kairouan lived through quieter centuries under the successive powers that ruled Tunisia —Almohads, Hafsids, Ottomans— always keeping its character as a holy, traditional city, very much turned in on itself. For a long time, non-Muslims were practically barred from entering the city, which reinforced its reputation as a sacred, inaccessible place. Under the French protectorate (1881-1956) and after Tunisian independence, the city gradually opened up and its heritage began to be studied, preserved and valued.
International recognition came in 1988, when UNESCO inscribed Kairouan on the World Heritage List (site No. 499). The listing covers the Great Mosque, the Mosque of the Three Doors, the Aghlabid basins, the zawiyas and the medina as a whole, and recognises the city's outstanding value as one of the great centres of Islamic civilisation and as a testimony to the first expansion of Islam in North Africa. Kairouan is, together with Carthage and Dougga, one of the pillars of Tunisia's world heritage.
Today Kairouan is a living and deeply traditional city, the most revered in the country, which keeps its role as spiritual capital. Its people carry on the crafts that made it famous —hand-knotted carpets and makroudh pastries— and its mosques remain places of worship and pilgrimage. Wandering its medina, looking into the courtyard of the Great Mosque founded by Uqba nearly fourteen centuries ago or gazing at the Aghlabid basins is a glimpse into the very origins of Arab and Muslim Tunisia, and into one of the founding chapters of the history of Islam in the West.