The city was founded by the Umayyads around 670,[1] in the period of Caliph Mu'awiya (reigned 661–680); this is when it became an important centre for Sunni Islamic scholarship and Quranic learning,[2] attracting Muslims from various parts of the world.
[13] The foundation of Kairouan dates to about the year 670 when the Arab general Uqba ibn Nafi of Caliph Mu'awiya 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.
Not having any more forces at his disposal, the Umayyad Caliph Hisham quickly appointed Handhala ibn Safwan as governor of Ifriqiya, with supervisory authority over all the Maghreb (North Africa west of Egypt) and al-Andalus (Spain), and instructed him to take whatever forces he could gather to defend Ifriqiya and quash the Berber rebellion.
The Berber rebel armies were to make junction in front of Kairouan, before launching their final attack on the city.
It soon became famous for its wealth and prosperity, reaching the levels of Basra and Kufa and giving Tunisia a period of power and prosperity.The Aghlabids 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.
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.
From Kairouan envoys from Charlemagne and the Holy Roman Empire returned with glowing reports of the Aghlabid palaces, libraries and gardens – and from the crippling taxation imposed to pay for their drunkenness and sundry debaucheries.
[16] 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.
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 eastern coast of 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 Caliphate and leaving the Zirids as their vassals in Ifriqiya.
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.
These invaders so utterly captured Kairouan from the Zirids in 1057[17] and destroyed it 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.
It was once the greatest city of the West in its expanse, the most populous, the wealthiest, the most prosperous, the most finely built, and the most ambitious, with the most profitable trade, the highest tax revenues, the most flourishing markets, and the greatest commercial gains, while its people were also the most rebellious and the most arrogant of the ignorant, yet among its virtuous elite, the dominant qualities were adherence to righteousness, fulfillment of covenants, avoidance of doubtful matters, abstention from prohibitions, mastery of refined sciences, and an inclination toward moderation.
[citation needed] Between the 9th and 11th centuries AD, Kairouan functioned as one of the great centers of Islamic civilization and gained a reputation as a hotbed of scholarship across the entire Maghreb.
During this period, the Great Mosque of Kairouan became both a place of prayer and a center for teaching Islamic sciences under the Maliki current.
[29] A unique religious tradition practiced in Kairouan was the use of Islamic law to enforce monogamy by stipulating it in the marriage contract.
[45] The Banu Hilal conquest of Kairouan in 1057 led to the decline of the medieval community with Jews only returning after Tunisia was established as a French protectorate in 1881.
Originally built when Kairouan was founded in 670 AD, the mosque currently occupies an area of over 9,000 square metres (97,000 sq ft) and is one of the oldest places of worship in the Islamic world.
Dating from the 9th century and located outside the ramparts of the medina of Kairouan, they are considered to be the most important hydraulic systems in the history of the Muslim world.
[54] The governorate of Kairouan is known mainly for the production of vegetables (peppers, tomatoes) and fruits (apricots, almonds and olives).