Ottoman–Safavid relations
The history of Ottoman–Safavid relations (Persian: روابط عثمانی و صفوی) started with the establishment of Safavid dynasty in Persia (Iran) in the early 16th century. The initial Ottoman–Safavid conflict culminated in the Battle of Chaldiran in 1514, and was followed by a century of border confrontation. In 1639, Safavid Persia and Ottoman Empire signed the Treaty of Zuhab which recognized Iraq in Ottoman control, and decisively parted the Caucasus in two between the two empires. For most of it, the Zuhab treaty was a consolidation of the Peace of Amasya of about a century earlier . Until the 18th century, the struggle between the Safavid version of Shia Islam and the Ottoman Turkish version of Sunni Islam had continued to remain an important dimension of the combative relationships between the two major empires. In the early 18th century, Persian–Ottoman peace negotiations introduced a new concept of inter-Muslim relations whereby sovereign states could co-exist as autonomous parts of the Islamic world community. Although the further relations were guided by the mutual fear of weakness and distrust, it wasn't until 1847 when Qajar Persia and Ottoman Empire reached a substantial peace Treaty of Erzurum , starting a century of peace, after centuries of rivalry. Emergence of a rivalry: 16th century. Role of religion. Islam played an especially important role in defining the Ottoman–Safavid relationship. Both the Safavids and Ottomans relied on ties to Islam to help justify their individual rules. However, Islamic law prevents war of Muslims against each other, unless a religious need arises to enforce a sacred law or to check transgressions against it. Thus, for one power to wage war against the other, he would have to justify the action religiously. Selim I, sultan of the Ottoman Empire in the early  1500s, looked for such justification. Religious scholars and officials in the Ottoman Empire quickly labeled Shah Ismail, and by extension his followers, a threat to Islam for the heretical teachings they represented. As a result, Selim I ordered the execution of any sympathizers of Shah Ismail both in Constantinople and throughout Ottoman lands. Safavid threat in the Ottoman Empire. The severity with which Selim I addressed the Safavid Empire reflected the threat that he felt emerging within the Ottoman borders. In 1507, Shah Ismail raided Anatolia, revealing the beginnings of the threat that the newly emerging Safavid Empire represented. Uprisings  in Anatolia by followers of the Shi’a sect in the Shahkulu Uprising in 1511 solidified Selim's fear of internal rebellion. The uprisings and Shi’a culture retained influence from Shah Ismail and the Safavids. He embraced the same rhetoric used against the Safavids send military force to crush the rebellion. Trade embargoes. The Ottomans used trade embargoes consistently against the Safavid Empire as a way to assert dominance over their Eastern rival. The decisive Ottoman victory over the Safavids at Chaldiran in 1514 led to Ottoman rule in Asia Minor. In conjunction with invasions of Safavid lands and the capture  of Baghdad, Selim I began restricting trade routes for Safavid silk traders and arresting anyone who entered the Ottoman Empire from the Safavid Empire. The restriction of trade and arrests of intellectuals associated with the Safavids were only reversed under the leadership of Suleiman the Magnificent. Embargoes were also used in 1603, when the rise of Safavid power in the East once again became a worrisome threat, but the embargoes were not as successful as those embraced by Selim I.