The Mosque of Uqba is one of the oldest mosques in the world still in continuous use, founded by Uqba ibn Nafi in 670 AD when he established Kairouan as the Arab capital of North Africa. What you see today is largely the 9th-century reconstruction under the Aghlabid dynasty, though the core has been rebuilt and extended many times.
The complex is immense — a huge rectangular enclosure covering nearly 9,000 square metres, entered through massive carved stone gateways. The courtyard is paved in marble and studded with ancient columns. The minaret, the oldest surviving in the world, is a three-storey square tower of dressed stone that predates virtually every other Islamic minaret. Non-Muslims may enter the courtyard and the covered arcades but not the prayer hall itself, though the view through the doors gives a sense of the extraordinary interior forest of recycled Roman and Byzantine columns.
The mosque is the spiritual heart of the city and the reason Kairouan has the religious significance it does. Seven pilgrimages here were traditionally considered equivalent to one hajj to Mecca, a calculation that made the city a major destination for North African Muslims who could not afford the longer journey to the Hejaz.