Capture of Baghdad (1638)
The recapture of Baghdad was the second conquest of the city by the Ottoman Empire as a part of the Ottoman–Safavid War of 1623–1639. Background 
Baghdad, once the capital of Arab Abbasid Caliphate, was one of the most important cities of the medieval Muslim World. In the second half of the Medieval age, the Turkic dynasties (Seljuks, Kara Koyunlu, Ak Koyunlu) and others tried to gain control over this prestigious city. From 1508 till 1534 it was ruled by the emerging Safavid dynasty of Iran, between that time led by shah Ismail I and shah Tahmasp I respectively. In 1534, the Ottoman sultan Süleyman I () captured the city without any serious combat during the Ottoman–Safavid War (1532–55), which was confirmed in the resulting Peace of Amasya. However, 90 years later it was recaptured by Abbas I of Persia. Attempts of several Ottoman commanders () to retake the city following 1624, were fruitless. In 1638 Ottoman Sultan Murad IV (Suleyman I's Great-Great-Great Grandson) decided to recapture the city. According to legend, only the sultan in-person, could conquer the city. Murat was seen as a warrior hero and thus it seemed as his duty to campaign and regain Baghdad. He had been victorious against the Druze rebels a decade earlier and won a great victory at the Siege of Yerevan (1635) in 1635. According to the eyewitness account of Zarain Agha the Ottoman mobilization for the siege of Baghdad was 108,589 men composed of 35,000 infantry in part Janissaries, and 73,589 cavalry. The siege 
The birds' flight distance between Istanbul and Baghdad is about . According to historian Joseph von Hammer the Ottoman army covered this distance in 197 days with 110 staging stations in between. The siege began on 15 November 1638. The Safavids had increased the garrison size of the city by around 4-5 times. There were four main gates of the city, the North Gate, Azamiye or Imam-i Azam, (of Abū Ḥanīfa), the South Gate  Karanlık (dark), Ak (white) and Köprü (bridge) gates. The Ottoman observer Ziyaeddin Ibrahim Nuri described the city's fortifications as follows: the city walls were 25 meters tall and between 10 and 7 meters wide, reinforced by earthen ramparts to withstand artillery bombardment and protected by a wide and deep moat. The city walls featured 114 towers between the North and South Gate, and another 94 towers that ran parallel to the Tigris. The Safavid commander, Bektash Khan, had made extensive repairs to the fortifications. Two Pashas were deployed against the first two gates. But the Grand Vizier Tayyar Mehmet Pasha noticed that these two gates were very well fortified. So he chose to attack on the third (Ak) gate which seemed less fortified. During the siege the Safavids made sallies of around 6,000 men at a time, this was followed by a retreat into the city and a fresh 6,000 to attack. These types of attacks greatly increased the casualties of the Ottomans. The siege continued for 40 days. Towards the end, impatient Murad urged the Grand Vizier for a general attack. The attack was successful and the city was captured on 25 December 1638 (on the 116th anniversary of the capture of Rhodes by Suleyman I). But during the final clashes, the Grand Vizier was shot down. Aftermath 
Although the defenders were given free passage to Persia, some resumed fighting after the capture of the city around Karanlık gate. The human loss during the after-capture fighting was severe. Nevertheless, soon after the capture, the new Grand Vizier Kemankeş Mustafa Pasha and the Persian representative Saruhan began peace talks and on 17 May 1639 the treaty of Zuhab was signed, which became an important historical treaty. By this treaty the modern Turkey-Iran and Iraq-Iran frontier lines were drawn. Although there were some other wars after the treaty of Zuhab, the treaties following the wars were merely the ratification of the treaty of Zuhab. Trivia 
During the Baghdad campaign Murad lost two of his Grand Viziers. The first was Bayram Pasha on 17 August 1638, who died on the way to Baghdad and the second was Tayyar Mehmed Pasha who died on 24 December 1638. Tayyar Mehmed was also the third Ottoman Grand Vizier who died on the battle field (the first two being Hadim Ali Pasha in 1511 and Hadim Sinan Pasha in 1517). After this victory Murad had two magnificent kiosks built in the Topkapi gardens, one for his victory at Yerevan and the other for his victory at Baghdad. See also 
 History of Baghdad

References

Sources
 

Baghdad
Baghdad
Baghdad
Sieges of Baghdad
1638 in Asia
17th century in Iran
1630s in the Ottoman Empire
Ottoman history of Baghdad