Shamakhi Fortress

General information
Shamakhi Castle – a fortress built to defend the medieval city of Shamakhi. In the XI-XII centuries, many cities of Shirvan grew and developed, some of them had their defense structures rebuilt. In 1045, Shirvanshah Gubad (1043-1049) built a new strong castle wall of carved white stone and iron gates in Shamakhi, the capital of Shirvan.

The remains of the wall discovered by archaeologists during excavations in Shamakhi during the USSR period are considered to be the remnants of Shamakhi Inner Castle (Bala Castle) built by Shirvanshah Gubad. In this era, a new palace complex of the Shirvanshahs was built in Bala Castle. Gulustan Castle, the second inner fortress of Shamakhi, was rebuilt and strengthened in the 12th century. Shamakhi, which became an exhausted capital city after such extensive construction works, is described by writers of that time as an impregnable fortress with iron gates and stone walls, a beautiful city with splendor.

History
Shamakhi castle, which was built to defend the city, can be pointed out. Thus, starting from antiquity and throughout the Middle Ages, the cities located in the ancient land of Shirvan, including Shamakhi, grew and developed a lot. This development attracted more attention especially in Shamakhi in the 11th-12th centuries. In order to maintain the achievements achieved from the economic point of view, at the same time to protect them from conflicts between the Shirvanshahs and the military leaders, and to eliminate the threat expected by the Oghuz-Seljuk Turks, Shirvanshah Gubad ibn Yazid (1043-1049) moved the capital of Shirvan to the vicinity of Shamakhi, the capital of Shirvan. he built a new, strong and strong castle wall of hewn white stone and put iron gates. The remains of those castle walls were discovered by archaeologists. This 2.5 m wide wall found during archeological excavations surrounded the central part of the city in an approximately circular shape. Sometimes the remains of the wall are considered to be only the remains of Shamakhi Inner Castle (the local population also called it Bala Castle). A palace complex belonging to the Shirvans was built in Bala Castle. The construction of such a magnificent defense device, fortress, and palace complex was not accidental, it was related to the activity of Shamakhi, one of the oldest centers of the East, as an art, trade and culture center. Therefore, many travelers, diplomats, etc., who came to Shamakhi for various purposes. They were interested in the monuments, people, culture, economic life and everyday life of this ancient city and collected information that has not lost its importance even today. Those data are considered valuable sources for the study of Shamakhi's defense fortifications, including its castles.

Policy of Shirvanshah Gubad was continued by subsequent rulers. At that time, special attention was paid not only to the strengthening of Shamakhi as a fortress, but also to the construction of new defensive fortresses and the strength of fortresses to protect their positions. Salar ibn Yazid, who came to power about a year after him, continued the policy of ensuring the security of the Shirvanshah state through fortresses. In 1562, the English traveler A. Jenkinson came to Shirvan. While Jenkinson is in Azerbaijan, he goes to Darband, Shamakhi, Javad and other cities. When he arrived in Shirvan (1562), he noted that there was a decline in the development of cities and fortresses, and this was due to the fact that Azerbaijani goods were not sold in Russia, there were fewer ships in the Caspian Sea, etc. connects with Jenkinson described the struggle between Turkey and the Safavids as a struggle over trade routes, especially the routes through which Shamakhi silk was transported to Europe.

Until the 14th and 15th centuries, together with the walls of the Shamakhi fortress, the Gulustan fortress played the role of the main defense point of the rulers of Shirvan. In the 14th century, Arif Ardabili, who was the tutor of Hushang, the son of Shirvanshah Kavus, informs about the presence of human figures carved from stone on the wall of the Gulustan fortress and calls the fortress Akhsitan fortress. German scientist and traveler Adam Oleary visited Shamakhi in 1636-1637 and provided valuable information about Shamakhi fortress walls. He showed that he had seen two men's heads carved on stone on the city walls, but it was nobody could not clarify what it meant.

Despite the fact that Shamakhi Castle was surrounded by double castle walls in the Middle Ages and Gulustan Castle became a reliable defensive castle in times of danger, the emergence and use of firearms, especially cannons, in the 15th and especially the 16th and 17th centuries caused Shirvan shahs to return to the problem of defense. They could no longer use either the Shamakhi fortress or the Gulistan fortress to defend the state and the capital city through a more convenient fortress. This time, Bugurt Castle was supposed to act as a more magnificent and impregnable castle. That is why, after the 16th century, Bugurt Castle was mentioned more often in historical sources.