Kairouan (Arabic: القيروان Al Qairawān), also known as Kirwan or al-Qayrawan, is the capital of the Kairouan Governorate in Tunisia. Referred to as the Islamic Cultural Capital, it is a UNESCO World Heritage site. The city was founded by the Arabs around 670. In the period of Caliph Mu'awiya (reigned 661-680), it became an important centre for Islamic and Quranic learning, and thus attracting a large number of Muslims from various parts of the world, next only to Mecca and Medina. The holy Mosque of Uqba is situated in the city.
The name is Arabic قيروان kairuwân, itself from the Persian کاروان kârvân, meaning "military/civilian camp" (kâr [war/military] + vân [outpost]), "caravan", or "resting place".
Kairouan was founded in about the year 670 when the Arab general Uqba ibn Nafi of Amir Muauia selected a site in the middle of a dense
forest, then infested with wild beasts and reptiles, as the location of a military post for the conquest of the West. Formerly, the city of Kamounia was located where Kairouan now stands. It was a
Byzantine garrison before the Arab conquest. It was located far from the sea where it was safe from the continued attacks of the Berbers who had fiercely resisted the Arab invasion. Berber resistance
continued, led first by Kusaila, whose troops killed Uqba at Biskra about fifteen years after the military post was established and then by a Berber woman called Al-Kahina who was killed and her army
defeated in 702. Subsequently, there was a mass conversion of the Berbers to Islam. Kharijites or Islamic "outsiders" who formed an egalitarian and puritanical sect appeared and are still present on
the island of Djerba. In 745, Kharijite Berbers captured Kairouan, which was already at that time a developed city with luxuriant gardens and olive groves.
Power struggles remained until Kairouan was recaptured by Ibrahim ibn al-Aghlab at the end of the 8th century. In 800, Ibrahim was confirmed Emir and hereditary ruler of
Ifriqiya by Caliph Harun ar-Rashid in Baghdad. Ibrahim ibn al-Aghlab founded the Aghlabid dynasty that ruled Ifriqiya between 800 and 909. The new Emirs embellished Kairouan and made it their capital
which soon became famous for its wealth and prosperity reaching the levels of Basra and Kufa and giving Tunisia one of its golden ages long sought after the glorious days of Carthage.
The Aghlabites built the great mosque and established in it a university that was a centre of education both in Islamic thought and in the secular sciences. Its role can
be compared to that of the University of Paris in the Middle Ages. In the 9th century, the city became a brilliant focus of Arab and Islamic cultures attracting scholars from all over the Islamic
World. In that period Imam Sahnun and Asad ibn al-Furat made of Kairouan a temple of knowledge and a magnificent centre of diffusion of Islamic sciences. The Aghlabids also built palaces,
fortifications and fine waterworks of which only the pools remain. From Kairouan envoys from Charlemagne and the Holy Roman Empire returned with glowing reports of the Aghlabites palaces, libraries
and gardens – and from the crippling taxation imposed to pay for their drunkenness and sundry debaucheries. The Aghlabite also pacified the country and conquered Sicily in 827.
In 893, through the mission of Abdullah al Mahdi, the Kutama Berbers from the west of the country started the movement of the Shiite
Fatimids. The year 909 saw the overthrow of the Sunni Aghlabite that ruled Ifriqiya and the creation of the Shiite Fatimid dynasty. During the rule of the Fatimids, Kairouan was neglected and lost
its importance: the new rulers resided first in Raqqada but soon moved their capital to the newly built Al Mahdiyah on the coast of modern Tunisia. After succeeding in extending their rule over all
of central Maghreb, an area consisting of the modern countries of Morocco, Algeria, Tunisia and Libya, they eventually moved east to Egypt to found Cairo making it the capital of their vast Califate
and leaving the Zirids as their vassals in Ifriqiya. Governing again from Kairouan, the Zirids led the country through another artistic, commercial and agricultural heyday. Schools and universities
flourished, overseas trade in local manufactures and farm produce ran high and the courts of the Zirids rulers were centres of refinement that eclipsed those of their European
contemporaries.
When the Zirids declared their independence from Cairo and their conversion to Sunni Islam in 1045 by giving allegiance to Baghdad, the Fatimid Caliph Ma'ad al-Mustansir
Billah sent as punishment hordes of troublesome Arab tribes (Banu Hilal and Banu Sulaym) to invade Ifriqiya. These invaders so utterly destroyed Kairouan in 1057 that it never regained its former
importance and their influx was a major factor in the spread of nomadism in areas where agriculture had previously been dominant. Some 1,700 years of intermittent but continual progress was undone
within a decade as in most part of the country the land was laid to waste for nearly two centuries. In the 13th century under the prosperous Hafsids dynasty that ruled Ifriqiya, the city started to
emerge from its ruins. It is only under the Husainid Dynasty that Kairouan started to find an honorable place in the country and throughout the Islamic world. In 1881, Kairouan was taken by the
French, after which non-Muslims were allowed access to the city.
The most important mosque in the city is the Great Mosque of Sidi-Uqba also known as the Great Mosque of Kairouan. It has been said that seven pilgrimages to this mosque is considered the equivalent of one pilgrimage to Mecca. After its establishment, Kairouan became an Islamic and Qur'anic learning centre in North Africa. An article by Professor Kwesi Prah describes how during the medieval period, Kairouan was considered the third holiest city in Islam after Mecca and Medina. Today, many consider the city as the fourth holiest in Islam. In memory of Sufi saints, Sufi festivals are held in the city. Judaism, no longer prevalent in the city, has an illustrious history in Kairouan, particularly in the early Middle Ages. Rabbeinu Chushiel, his son Rabbeinu Chananel, and R. Nissim Ben Jacob (R. Nissim Gaon) were all from Kairouan and Rabbi Isaac Alfasi studied there, as did many other great rabbis. The rabbinical students of Kairouan are a major part of the transmission of the Oral Law from Babylonia to Spain. Kairouan was thus the first major centre of Jewish learning outside of Babylonia and Eretz Yisrael.
The city's main attraction is the Great Mosque of Sidi-Uqba, which is said to largely consist of its original building materials. In fact most of the column stems and capitals were taken from ruins of earlier-period buildings, while others were produced locally. There are 414 marble, granite and porphyry columns in the mosque. Almost all were taken from the ruins of Carthage. Previously, it was forbidden to count them, on pain of blinding. The Great Mosque of Kairouan (Great Mosque of Sidi-Uqba) is considered as one of the most important monuments of Islamic civilization as well as a worldwide architectural masterpiece. Founded by Arab general Uqba Ibn Nafi in 670 CE, the present aspect of the mosque dates from the 9th century. The Great Mosque of Sidi-Uqba has a great historical importance as the ancestor of all the mosques in the western Islamic world.