The Shah's opportunity came with a series of rebellions in the Ottoman Empire:
Abaza Mehmed Pasha, the governor of
Erzurum,
rose in rebellion, while Baghdad had been since 1621 in the hands of an officer of the
Janissaries, the
subashi Bakr, and his followers. Bakr had sought his recognition as the local
pasha from the
Porte, but the Sultan had ordered
Hafız Ahmed Pasha, the governor of
Diyarbakir, to intervene. The fall of the city was followed by the massacre of a large part of its Sunni inhabitants, as the Shah endeavored to transform Baghdad into a purely Shiite city. In 1625,
Hafız Ahmed Pasha, now
Grand Vizier, marched to retake Baghdad. Despite a "
scorched earth" policy ordered by the Shah, the Ottoman army reached Baghdad and invested it in November on three sides. (1635) (Revan on the map) was led by sultan Murad IV and resulted in the capture of Yerevan on 8 August and
Tabriz on 11 September. In 1629, the Ottomans, having secured peace with the Habsburgs, mustered their forces for another offensive under the new and capable Grand Vizier
Gazi Hüsrev Pasha. A severe winter and heavy floods made operations in central Iraq impossible, and Hüsrev turned his army east instead, invading Persia proper. On 4 May 1630 he routed the Persians under Zainal Khan Begdeli Shamlu in battle at Mahidasht near
Kermanshah and proceeded to sack the city of
Hamadan. Hüsrev Pasha then turned back towards Baghdad and besieged it in November. However, the siege had to be lifted soon, as the onset of another heavy winter threatened his lines of communication. In the wake of his withdrawal, the Persians re-established their control of Iraq, and subdued the rebellious
Kurdish populations. The next few years saw constant raiding and skirmishes, without either side claiming any decisive advantage. Shah
Safi (r. 1629–42) sent a peace delegation to the Ottoman court, but the new Grand Vizier,
Tabanıyassi Mehmed Pasha, rejected its demands. In 1635, in a conscious effort to emulate his warrior predecessors, Sultan Murad IV himself took up the leadership of the army. The Ottomans took Revan (on 8 August) and plundered Tabriz. The victorious Sultan returned in triumph to Constantinople, but his victories were short-lived: in the spring of the next year, Shah Safi retook Revan and defeated an Ottoman army. Renewed Persian peace proposals failed, and in 1638, Murad IV again personally led an army against Baghdad. The city fell in December after a siege of 39 days, effectively restoring Ottoman control over Iraq, and peace negotiations began soon after. ==Aftermath==