The fortifications were built on order of Ali ibn Yusuf,[2] and were made of rammed earth, not masonry, indicating that they were constructed with expedience at a time when the Almoravid dynasty was threatened by the Almohad Caliphate. It was conquered by the Almohads in 1132, and Almohad caliph Abd al-Mu'min had the wooden gates removed, to be installed at Tinmel.[3]