The mosque was built by Uqba Ibn Nafi, the founder of the city, about 60/680. Even women were students here. The Atiqa Maktaba Library at the mosque was established in 221/836 by King Allah Ibn Ibrahim when he ordered the mosque to be enlarged. Scholars, monarchs, and other men supported the library. Much of its collection was destroyed or stolen during an Egyptian invasion in about 449/1057. It took the library about 200 years to recover.
The Zaytuna Mosque was founded by Hassan Ibn al-Numan in about 80/699 and enlarged in 116/734 by Ubayd Allah Ibn al-Habbab. The mosque had two libraries.
The Abdaliya Library began in another building, but was moved into the mosque. It was established by Prince Abu Abd Allah Muhammad Ibn al-Hussain, who appointed capable librarians. About 3,000 manuscripts were transported to the Tunisian National Archives in recent years.
Another library was established at the mosque by Prince Uthman. It was smaller than the Abdaliya Library.
(This page was updated in December 2012.)