It is a palace dating back to the fifteenth century. Built by the rulers of Shirwan known as the Shirvanshahiyin, it was described by UNESCO as "one of the pearls of Azerbaijani architecture" dating back to the fourteenth century AD. This palace was the residence of the rulers of Shirwan, the ruling dynasty of northeastern Azerbaijan during the Middle Ages.