Capture of Baghdad (1638)

Cross-checked

Baghdad, which had fallen to the Safavids in 1624, was retaken in a siege that began on 15 November 1638 under Murad IV's personal command. The fortress commander Bektaş Khan decided to surrender the city on 24 December 1638.

Belligerents

Ottoman Empire

Commanders
Murad IV, Grand Vizier Tayyar Mehmed Pasha, Kaptanıderya (grand admiral) Kemankeş Kara Mustafa Pasha
Strength
According to Turkish Wikipedia, 108,589 soldiers (about 88,000 of whom took part in the fighting) and 200 guns.

Safavid Empire

Commanders
Fortress commander Bektaş Khan
Strength
According to Turkish Wikipedia, a garrison of 40,000 men and 100 guns.

3 min readUpdated: 20 November 2026

Baghdad had come under Ottoman rule in 1534, in the reign of Süleyman I. Ninety years later it passed into Safavid hands, and fourteen years after that, in 1638, it was retaken in a siege led personally by Murad IV. According to Turkish Wikipedia, this campaign was the last engagement of the Ottoman–Safavid war that began in 1623.

How was Baghdad lost?

According to the TDV İslâm Ansiklopedisi, in the first years of Murad IV’s reign the vacuum of authority at the centre led provincial governors to act on their own. As a result of the activities of Bekir Subaşı in Baghdad, the city passed into Safavid hands in 1624. According to Turkish Wikipedia, Bekir Subaşı announced that he would submit to the Safavid shah Abbas I on condition that the governorship of Baghdad be given to him, and asked for help.

The sieges of Hafız Ahmed Pasha in 1626 and of Hüsrev Pasha in 1630 to retake the city produced no result.

The sultan’s campaign

After the Revan campaign of 1635, Murad IV began preparations for a great campaign for Baghdad. According to the TDV, when Shah Safi sent an envoy for peace, the sultan did not receive the envoy, saying that the reply to the letter would be given in Baghdad.

The sultan set out on 8 May 1638 together with Şeyhülislam Yahya Efendi and Kaptanıderya Kemankeş Kara Mustafa Pasha. Advancing by way of Konya, Adana, Aleppo, Urfa and Diyarbakır, the army reached Mosul and from there Baghdad. On the way Grand Vizier Bayram Pasha died and was replaced by Tayyar Mehmed Pasha, the governor of Mosul.

The siege

According to the TDV’s article “Bağdat”, the siege began on 15 November 1638 and lasted forty days. According to Turkish Wikipedia, the city was defended by a garrison of about 40,000 men led by the Safavid commander Bektaş Khan.

According to the TDV, Murad IV followed all the stages of the siege closely and at times went as far as the metris (trenches). Although a general assault was considered, it was thought best to take the city by advancing through trench digging, and the siege continued, growing fiercer for days.

Grand Vizier Tayyar Mehmed Pasha, who had been scolded by the sultan the day before for not launching an assault, was killed by a bullet that struck his forehead as he fought in front of the soldiers. Kemankeş Kara Mustafa Pasha was appointed in his place. The next day, 24 December 1638, Bektaş Khan decided to surrender the city and was received in the presence of the sultan.

After the surrender

According to the TDV, the sultan told the soldiers in the fortress that they could stay with him if they wished or go to the shah. But when the news spread that the Iranians in the city were digging a lağım (tunnel in which explosives are placed) under the towers held by the Ottomans, fighting broke out again and lasted a day and a night. Many Iranians were captured and very many were killed. Turkish Wikipedia’s article “Osmanlı-Safevî Savaşı (1623-1639)” writes that the whole Safavid garrison was put to the sword.

According to the TDV, the city had been largely ruined in the siege. Murad IV had the buildings and the tombs of Imam-ı Azam and Abdülkadir Geylani repaired. Leaving the grand vizier in Baghdad, he set out for Istanbul on 17 January 1639.

The Treaty of Zuhab (Kasr-ı Şirin)

After the capture of Baghdad, Kemankeş Kara Mustafa Pasha advanced with his army towards Iranian lands. The peace negotiations were held at Zuhab, near Kasr-ı Şirin, and the treaty was signed on 17 May 1639. According to the TDV, by this treaty Baghdad, Basra and Shahrizor remained with the Ottomans, while Revan was left to the Safavids.

Why does it matter?

According to the TDV, the Treaty of Kasr-ı Şirin put a definitive end to the Ottoman–Safavid dispute that had lasted until 1639. The border questions in the Kerden agreement of 1746 and in the Erzurum treaties of the nineteenth century were also resolved on the basis of this treaty.

Related

Sources

  1. Ziya Yılmazer, "Murad IV", TDV İslâm Ansiklopedisi, Türkiye Diyanet Vakfı İslâm Araştırmaları Merkezi (İSAM), c. 31, s. 177-183 (accessed: 19 Nov 2026)
  2. Yusuf Halaçoğlu, "Bağdat" (Osmanlı Dönemi), TDV İslâm Ansiklopedisi, Türkiye Diyanet Vakfı İslâm Araştırmaları Merkezi (İSAM), c. 4, s. 433-437 (accessed: 18 Nov 2026)
  3. Bağdat Seferi, Vikipedi, Özgür Ansiklopedi (Türkçe), Wikimedia Foundation (accessed: 18 Nov 2026)
  4. Rhoads Murphey, "Kasrışîrin Antlaşması", TDV İslâm Ansiklopedisi, Türkiye Diyanet Vakfı İslâm Araştırmaları Merkezi (İSAM), c. 24, s. 575 (accessed: 18 Nov 2026)
  5. Osmanlı-Safevî Savaşı (1623-1639), Vikipedi, Özgür Ansiklopedi (Türkçe), Wikimedia Foundation (accessed: 18 Nov 2026)