The Islamic governors of Tunisia built the Great Mosque at Kairouan in the 800s AD, in the time of the Abbasid Empire. This was the same time as the reign of Charlemagne. But the mosque at Kairouan was much grander than anything being built in Europe at this time. It was more on the same scale as the Chola temples in South India.
These are some more pictures of the mosque at Kairouan. Here you can see the columns of the peristyle that goes around the big courtyard. The builders took a lot of the columns from old Roman buildings. They wanted to show that the Islamic rulers had defeated the Romans. Can you see that the arches come in again at the bottom a little like a keyhole? The Visigoths in Spain invented this kind of arch. Then when the Umayyads conquered Spain, people started to use this keyhole arch all around the Mediterranean Sea.
This is the entrance to the prayer hall of the Kairouan mosque. All the men went inside this hall to pray kneeling on prayer rugs on the floor. They listened to the imam’s sermons there. Women, and men who are not Muslims, were not allowed inside the prayer hall.
But when men were not praying, sometimes teachers also used this room as a school. Children came there to learn about Islam and to memorize verses from the Koran.