Referring to an epigraphic inscription (Arabian Cufic writing) on the entrance door, the mosque was built in 471 Anno Hegira (1078-79 AD) by master rais Mohammmad Abubekir oglu. A small vestibule adjoins on the north of the one-room praying hall embellished with rich decorative elements. Along the centre line of the fortress wall is a pair of windows covered with tracery. The hall covered with a pointed ceiling on the eastern and western parts was embellished with the windows with crumbling ornament. It is interesting that a band-shape ornament along the frame of the arcade was built with burnt brick which is alien to the Baku-Absheron architecture.
In the folk etymology, the monument is also named "Siniqqala". The magnificent monument suffered during artillery bombardment from the sea ordered by the Admiral of the Russian Fleet Matyushkin sent by Peter the Great to Baku on a reconnaissance mission and the top of the minaret of its mosque was broken away, that is why it is known as "Siniqqala". The cylindrical minaret attached to the mosque ends on the top with a tracery muezzin balcony set on a stalactite cornice. Spiral stone staircases built within the minaret start from the floor of the prayer hall. At some height, the minaret has a door leading to the mosque roof. Large stone slabs are laid on the roof. A Quran aya is inscribed in Arabic with Cufic writing along the stalactite belt on the upper part of the minaret. The base of the minaret is low and square. The southern façade of the mosque has oblong proportions expressed in a protruding semicylindrical mehrab and pointed windows on the background of the millennial stone wall. Dynamics of spatial composition of the mosque is expressed in the minaret which overshadows the adjacent buildings. The rehabilitation works have completely restored an architectural image of the ancient mosque which has an epigraphic inscription
During archaeological excavations in 1988, archaeologist F. A. Ibrahimov discovered an unexpected large-scale pattern of the mosque. The minaret which always was recognised in its low shape now has appeared as a perfect structure built on the square base. A similar type room covered with a pointed dome was revealed below the prayer hall. Beneath a lower layer of the room elements of pre-Islamic religious ceremonies have been traced. Artefacts found during the archaeological excavations give ground to believe that the room was built just in the antique period. It is supposed that the mosque was erected over the foundation of a pre-Islamic temple of fire existed here. Columns with capital revealed in the room are a strong evidence proving that Baku is a city of great antiquity.