Al Qayrawan, Kairouan, was founded in the 7th century by the Moslems, and grew to importance as the Islamic culture capital training Moslems from across the world, and recognised as the third most important city after Mecca and Medina. Its name has a derivation similar to “caravan” meaning military stopping off place, ie oasis.
The site, in the middle of a forest, was chosen for a military encampment by General Uqba ibn Nafi whilst his invasion force was being repelled by the local Berber tribes. The strong Berber resistance was led by a female called Al Kahina, but in 702 her army was defeated and she was killed. This led to the ultimate conversion of the Berber tribes to Islam. Kairouan continued to be at the centre of friction between the Berbers and the Arabs, being captured by the Berbers before finally falling to the Arabs at the end of the 8th century.
The new Arab rulers made Kairouan their capital bring wealth and prosperity to the area. The new Great Mosque was built and an Islamic university was established making Kairouan an important centre of learning. The Great Mosque of Sidi Uqba, founded in 670 but completed in the 9th century, owes much of its decorative stonework to that pillaged from Carthage, including most of its 414 columns which are a mixture of Corinthian, Doric and Ionic.
This was the golden age of Islamic sciences, when great strides were made in the discovery and understanding of many subjects. The mainstays of the Islamic sciences were mathematics, astronomy and medicine, but other subjects such as alchemy, cartography and natural law were also taught and studied. The Arab scientists were polymathic, being skilled as writers and poets as well as the true scientists. By the 9th century Kairouan had reached its peak, with developments in techniques of automation and water management, the large reservoirs, known as the “Aghlabid Basins,” still remain in the city.
At the beginning of the 10th century, when the Shi ite Fatimids conquered the Sunni ruled city, they chose to move their capital north to the new city of Al Mahdiyah, leaving Kairouan to decline. Having conquered all the North African Maghreb, from Morocco to Libya, the Fatimids were to conquer Egypt, establish the city of Cairo near ancient Memphis, and make it the capital city of the caliphate.
By the middle of the 11th century, the Zirid vassals in Kairouan were ready to declare independence from Cairo, convert to the Sunni Islamic religion, and give allegiance to Baghdad. This allowed the schools, universities and trade to once again return to its former glory making Kairouan one of the most important cities in the world at that time. The aggrieved Fatimid Caliph however sent armies against the Sunnis, and so damaged the infrastructure of the area that many of the surviving Berbers were forced back into their nomadic lifestyle. It was left to the later Hafsid dynasty, in the 13th century to establish Kairouan as a major city in the Islamic world, and also the main centre of Judaic teaching outside Israel.
The famous Mosque of the Barber is a misconception. It is the Mausoleum of Sidi Sahab, a religious school dating from the 17th century, and named after the friend and companion of the prophet Muhammad, who having preserved three hairs from Muhammed’s beard, became known as the “Barber.”