The structure was built by Khalif Niyaz-kul, a wealthy Bukharan of Turkmen origin in 1807 under the rule of the Manghit dynasty.
In spite of its unusual outward shape, the building has a typical interior for a Central Asian mosque.
Owing to the buildings cupola, the room has good acoustic properties and therefore takes on special significance of 'dhikr-hana' – a place for ritualized 'dhikr' ceremonies of Sufi, the liturgy of which often include recitation, singing, and instrumental music.
On either side of the central edifice are located dwelling rooms, some of which have collapsed, leaving only their foundations visible.
[5] In 1995, due to an underground brook, one of the four towers collapsed [6] and emergency assistance was applied for and granted by UNESCO under the World Heritage Fund.