# Siege of Shamakhi (1607)

The Siege of Shamakhi, a phase in the The Ottoman–Safavid war (1603–1612) siege resulted in the Safavid army's success and Shamakhi's return to Iranian rule after 28 years. During the siege, Baku and Derbent also surrendered to the Iranian army, allowing the Safavid State to regain control of Azerbaijan and Dagestan. As a result, the Safavids were able to regain all the lands they had lost during the Ottoman-Safavid War of 1578-1590 between 1603-1607.

## Developments before the siege

Shah Abbas's campaigns to regain the territories lost in the Ottoman–Safavid war (1603–1612) resulted in the Safavid army's success; in 1603, all of Western Iran, especially Nihavend and Tabriz, and in 1604, all of Armenia, especially Yerevan and Tbilisi, and Eastern Georgia came under the rule of the Safavid State; after the Ottoman army launched a counter-attack in 1605 and suffered a major defeat in the Battle of Urmia, Shah Abbas turned towards Azerbaijan in 1606. In the same year, Ganja was besieged and captured Shah Abbas wanted to complete the conquest of Azerbaijan while negotiating peace with the Ottomans and gain an advantageous position.
In 1606, the Ottoman army sent to Iran under the command of Deli Ferhat Pasha was dispersed in Konya due to poor command and indiscipline, and the new commander, Grand Vizier Kuyucu Murat Pasha,decided to suppress the Celali rebellions that had destroyed state authority in Anatolia and Syria before launching an expedition against Iran.

## Siege

Thanks to this, Shah Abbas began to besiege the center of Shirvan, Shamakhi, in January 1607, without the threat of an Ottoman army behind him. The Ottomans captured this place as a result of the victories of the Turkish army under the command of Özdemiroğlu Osman Pasha in the First and Second Battles of Shamakhi in 1578, and they settled there definitively in 1579 and built a castle in 1583. As a result of Shah Abbas's successes between 1603 and 1606, Shamakhi Fortress was the last Ottoman stronghold in Southern Caucasus, and was 600 kilometers away from the Ottoman border and had no connection with Ottoman territory.
However,the castle was built to last a long time, and its walls and towers were high, and the moat around it was deep and could only be crossed by building a bridge. The castle was surrounded from the north by the corps under the command of Allahverdi Khan and from the west by the corps under the command of Shah Abbas. Reinforcements from Azerbaijan and Kirman were added to the troops under the command of Shah Abbas. No troops could be deployed there because the eastern wing had turned into a swamp due to heavy rainfall and the possibility of the siege weapons being buried in this swamp. The fact that the southern wing as well as the eastern wing were left without soldiers was detrimental to the Iranian army. Indeed, the castle garrison, which launched a huruç operation from these wings, managed to inflict serious losses on the Iranian army. In contrast, the Turkish troops were unable to prevent the ongoing fortification activities and cut off the Iranian army's supply lines despite the heavy rain.
Planning to cross the moat with a bridge, Shah Abbas had small fortresses built, surrounded by small moats, to protect his soldiers who would build the bridge from the shots of the fortress's riflemen and archers. These fortresses could also prevent Ottomans' sally attacks. On the other hand, Hüseyin Kuli Bey Kaçar managed to have the heavy siege cannons used in the Siege of Ganja transferred to Shamakhi. While these cannons were distributed to the besieging forces in the north and east, reinforcements under the command of Pir Budak Khan arriving from Tabriz further increased the power of the besieging army.
Despite this, two events shook the Iranian army, which tightened the siege. First, the collapse of the bridge construction caused the death of many personnel. Shah Abbas was able to stop the rumors that he was also dead by appearing before his troops. Second, the uneasiness caused by the rumor that the Shaybanis had launched a new offensive towards Khorasan. The news that this offensive had been repelled by local Safavid troops gave the army a great morale boost, and Shah Abbas began to prepare for the general offensive.
In the general offensive that began on June 27, the cannons firing stone cannonballs managed to inflict considerable damage on the castle towers. The engineers, who had also crossed the moat with the help of the bridge that had been built, began to dig under the castle walls. In the meantime, the troops under the command of Karchakay Bey captured one of the important towers of the castle. Then the troops under the command of Azeri Zulfiqar Khan captured another tower. 150 Iranian soldiers were able to enter the castle thanks to this, while Karchakay Bey began to force the gate near which these soldiers were located. Shah Abbas also gave the order for all troops to attack. The garrison in the castle suffered between 2,000 and 3,000 casualties in hand-to-hand combat. As a result of these losses, the gate where the attack was concentrated fell and the entire Iranian army began to flow into the castle through this gate.
While the remaining Turkish troops were being massacred by the local people, the Iranian army captured the command and the remaining soldiers. 150 large- and 500 small-caliber cannons and 6,000 rifles fell into the hands of the Iranian army. While the captured castle commander, Shirvan Beylerbey Ahmed Pasha, was released, his assistant Shamseddin Pasha was executed along with his family.

## Fall of Baku and Derbent

Shah Abbas's siege of Shamakhi, the capital of Shirvan, in January 1607 put the last Ottoman garrisons in Azerbaijan and Dagestan, Baku and Derbent in danger. Both of these cities had been annexed to the Ottoman Empire in 1578. The aristocracy in both cities managed to convince the local population to revolt against Ottoman rule in January 1607. When the garrison commander in Baku learned of the preparations for the revolt, the rebels directly attacked the commander's palace and captured him and his staff. The captured soldiers were beheaded and sent to Shah Abbas. Upon receiving the news, Shah Abbas sent gifts to the successful rebels.
The uprising against the Turkish troops in Narinkale, who were protecting Derbent, began in February. Realizing that he could not hold out there after Baku fell, the castle commander Kiziroğlu Ahmet Pasha surrendered at the beginning of March and sent the keys of the castle to Shah Abbas. Thus, 29 years of Ottoman rule in the two cities ended. Shah Abbas gave the governorship of the city to Çırağ Sultan Ustaclu.

## Developments after the siege

In this way, the Safavid Iran managed to regain all the lands it had lost in the Ottoman–Safavid War (1578–1590) in a short period of four years between 1603-1607. The Ottoman Empire, on the other hand, gave priority to eliminating two obstacles to its approach to the Safavid Iran.

## sources

* Zieneb Hatamzad, "Foreign Policy of the Safavid Empire During Shah Abbas I", Life Science Journal (2013), 10(8s)Archived 4 March 2016 at the Wayback Machine
* İran tarihinde 1607 Archived 4 March 2016 at the Wayback Machine
* Özer Küpeli, "Osmanlı-Safevi Münasebetleri (1612-1639), Ege Üniversitesi Sosyal Bilimler Enstitüsü, İzmir (2009)Archived 18 May 2015 at the Wayback Machine
* Kaveh Farrokh "Iran at War:1500-1988", Osprey Publishing, 20 Dec 2011
* Ismail bey Zardabli, "The History of Azerbaijan: from ancient times to the present day", Lulu.com, 2 Aug 2014
* Cihat Aydoğmuşoğlu, "Şah Abbas ve Zamanı", Ankara Üniversitesi, Ankara (2011)