Mysterious, shrouded in legends and tales Sabail castle is of particular interest because it is located directly under the water, 350 meters from the shore, and often for this reason is called an underwater city. It was erected on a rocky island in the Baylovskoy Bay by Shirvanshah Fariburz III, in 1235. Presumably, the castle was built for defensive purposes, as a protective sea fortress, at the same time served as the residence of Shirvanshahs. The necessity of erecting the castle is explained by potential danger of enemy attack from the sea. Therefore at the end of XII century Shirvanshahs formed a navy, which surrounded the fortress. The evidence of this is the stones with holes for lashing of vessels which are visible from the outside around the walls. In the XIII century, the Mongols, who had no navy, have long tried to conquer the fortress. But despite, the fact that they destroyed the upper part of the castle with the siege weapons, they never managed to conquer it. In 1306, the fortress went into the water because of the strong earthquake in the south of the Caspian Sea and the dramatic rise of the sea level. Since the beginning of the XIV century and to the beginning of the XVIII century, the building was flooded by the waters of the Caspian Sea. In 1723, in connection with the lowering of the Caspian Sea apex of the tower came into view from the water. The top structure is completely destroyed, only the lower part of walls and towers, reaching in some places around 1,5-2 m. in height remained intact.
Archaeological excavations of the fortress revealed that remained the foundations of nine dwellings, two of which had fireplaces. From the bottom of the sea has been collected about 700 stones with inscriptions, fragments of pottery of black and red roasting, vessels, copper coins of Shirvanshakh Kershasba (1203/4-24), etc. And today, some stones raised from the seabed, at the moment are in the Museum of Shirvanshahs` Palace.