At the foundation of Kairouan in 670, the Arab general and conqueror Uqba ibn Nafi (himself the founder of the city) chose the site of his mosque in the center of the city, near the headquarters of the governor. Around 690, shortly after its construction, the mosque was destroyed during the occupation of Kairouan by the Berbers, originally conducted by Kusaila. It was rebuilt by the Ghassanid general Hasan ibn al-Nu'man in 703. With the gradual increase of the population of Kairouan and the consequent increase in the number of faithful, Hisham ibn Abd al-Malik, Umayyad Caliph in Damascus, charged his governor Bishr ibn Safwan to carry out development work in the city, which included the renovation and expansion of the mosque around the years 724–728. During this expansion, he pulled down the mosque and rebuilt it with the exception of the mihrab. It was under his auspices that the construction of the minaret began. In 774, a new reconstruction accompanied by modifications and embellishments took place under the direction of the Abbasid governor Yazid ibn Hatim.