The mosque was built after 1230 by the architect Ali ibn Mohamed ibn Kacem following the orders of the Hafsid dynasty's founder Abu Zakariya Yahya (ruled between 1230 and 1249). It was the first mosque to be built in Tunis after Al-Zaytuna Mosque and was at first the beginning, a place of prayer, only for the rulers who lived in the Kasbah. Later it became a public mosque for the Friday prayer of the city. 
The mosque has a rectangular prayer room that has seven naves and nine spans.
|This article about a mosque or other Islamic place of worship in Tunisia is a stub. You can help Wikipedia by expanding it.|