Ottoman–Hotaki War (1726–1727)
The Ottoman–Hotaki War of 1726–1727 was a conflict fought between the Ottoman Empire and the Afghan Hotaki dynasty, over control of all western and northwestern parts of Iran. Background. The Hotak tribe had gained control over parts of current Afghanistan and Iran from 1722 to 1729, after having taken advantage of the heavily declining, plagued by civil strife and royal intrigues Safavid Dynasty of Persia. The Safavids, once the arch enemy and most powerful opponent of the Ottomans, had been severely declining since the late 17th century due to incompetent rulers and civil strife. The  Hotaki dynasty was founded in 1709 by Ghilzai Pashtuns of Kandahar who led a successful revolution against their Safavid suzerains. During the decline of the Safavid state, the Ottoman and Russian empires had taken advantage of Iran's decadence to annex de facto a large number of frontier districts. During the Afghan invasion, the Russians under Peter I immediately launched the Russo-Persian War (1722–1723), capturing and securing Iran's northwestern territories, comprising parts of Dagestan and Azerbaijan, as well as several territories in contemporary northern mainland Iran, such as Gilan and Astrabad. The Ottomans invaded from the west, capturing  swaths of Iran's western territories. By the Treaty of Constantinople (1724), Russia and the Ottomans agreed to divide the regions captured from Iran. War. Ashraf, posing as the rightful ruler (Shah) of Persia, demanded restitution of all the annexed territories. The Ottomans took offense at this perceived arrogance, and proceeded to sever relations with Afghanistan and open hostilities in Azerbaijan in the spring of 1726. Since one of the Ottoman's declared war aims was to restore the Safavids as a client dynasty, Ashraf's first response was to put Sultan Husayn, who was living in captivity at Isfahan , to death in the autumn of 1726. Then, after strengthening the city's fortifications, he marched out to meet Turkish troops and defeated them at Khoramabad, south of Hamadan, on 20 November 1726. The Afghan victory over a greatly superior military opponent was largely due to infiltration of the Ottoman ranks by agents provocateurs who emphasized the common Sunni faith of the Turks and the Afghans deplored the fratricidal war between them, and advocated alliance against their common enemies, the "heretical" Persians; this adroit tactic sapped the morale of the Turkish troops and procured the defection of the Kurdish cavalry . Preferring not to push onward, Ashraf opened negotiations which led to the signature of a peace treaty in October, 1727 (Treaty of Hamedan). The Afghans agreed with the treaty which confirmed Ottoman sovereignty over all the western and northwestern parts of Iran and, in return for Ashraf's abandonment of his territorial claims, gave him official recognition as Shah of Persia with rights of minting coins and sending annual pilgrimage caravans to Mecca. Aftermath. The great majority of Iranians still rejected the Afghan regime as usurping since the day they invaded. The dynasty lived under great turmoil due to bloody  succession feuds and resultant waves of internal revolts that made their hold on power tenuous and exhausted the strength of the Isfahan-based central government. That paved way for the rise of the Iranian military general Nader Shah and subsequently the continued wars of the Persian Empire with their Ottoman arch rivals.