<P> Notwithstanding the success with firearms at Jām, Tahmāsp still lacked the confidence to engage their archrivals the Ottomans, choosing instead to cede territory, often using scorched earth tactics in the process . The goal of the Ottomans in the 1534 and 1548 - 1549 campaigns, during the 1532 - 1555 Ottoman - Safavid War, was to install Tahmāsp's brothers (Sam Mirza and Alqas Mirza, respectively) as shah in order to make Persia a vassal state . Although in those campaigns (and in 1554) the Ottomans captured Tabriz, they lacked a communications line sufficient to occupy it for long . Nevertheless, given the insecurity in Iraq and its northwest territory, Tahmāsp moved his court from Tabriz to Qazvin . </P> <P> In the gravest crisis of Tahmāsp's reign, Ottoman forces in 1553 - 54 captured Yerevan, Karabakh and Nakhjuwan, destroyed palaces, villas and gardens, and threatened Ardabil . During these operations an agent of the Samlu (now supporting Sam Mizra's pretentions) attempted to poison the shah . Tahmāsp resolved to end hostilities and sent his ambassador to Soleymān's winter quarters in Erzurum in September 1554 to sue for peace . Temporary terms were followed by the Peace of Amasya in June 1555, ending the war with the Ottomans for the next two decades . The treaty was the first formal diplomatic recognition of the Safavid Empire by the Ottomans . Under the Peace, the Ottomans agreed to restore Yerevan, Karabakh and Nakhjuwan to the Safavids and in turn would retain Mesopotamia (Iraq) and eastern Anatolia . Soleymān agreed to permit Safavid Shi'a pilgrims to make pilgrimages to Mecca and Medina as well as tombs of imams in Iraq and Arabia on condition that the shah would abolish the taburru, the cursing of the first three Rashidun caliphs . It was a heavy price in terms of territory and prestige lost, but it allowed the empire to last, something that seemed improbable during the first years of Tahmāsp's reign . </P> <P> Almost simultaneously with the emergence of the Safavid Empire, the Mughal Empire, founded by the Timurid heir Babur, was developing in South - Asia . The Mughals adhered (for the most part) to a tolerant Sunni Islam while ruling a largely Hindu population . After the death of Babur, his son Humayun was ousted from his territories and threatened by his half - brother and rival, who had inherited the northern part of Babur's territories . Having to flee from city to city, Humayun eventually sought refuge at the court of Tahmāsp in Qazvin in 1543 . Tahmāsp received Humayun as the true emperor of the Mughal dynasty, despite the fact that Humayun had been living in exile for more than fifteen years . After Humayun converted to Shia Islam (under extreme duress), Tahmāsp offered him military assistance to regain his territories in return for Kandahar, which controlled the overland trade route between central Persia and the Ganges . In 1545 a combined Persian - Mughal force managed to seize Kandahar and occupy Kabul . Humayun handed over Kandahar, but Tahmāsp was forced to retake it in 1558, after Humayun seized it on the death of the Safavid governor . </P> <P> Humayun was not the only royal figure to seek refuge at Tahmasp's court . A dispute arose in the Ottoman Empire over who was to succeed the aged Suleiman the Magnificent . Suleiman's favourite wife, Hürrem Sultan, was eager for her son, Selim, to become the next sultan . But Selim was an alcoholic and Hürrem's other son, Bayezid, had shown far greater military ability . The two princes quarrelled and eventually Bayezid rebelled against his father . His letter of remorse never reached Suleiman, and he was forced to flee abroad to avoid execution . In 1559 Bayezid arrived in Iran where Tahmasp gave him a warm welcome . Suleiman was eager to negotiate his son's return, but Tahmasp rejected his promises and threats until, in 1561, Suleiman compromised with him . In September of that year, Tahmasp and Bayezid were enjoying a banquet at Tabriz when Tahmasp suddenly pretended he had received news that the Ottoman prince was engaged in a plot against his life . An angry mob gathered and Tahmasp had Bayezid put into custody, alleging it was for his own safety . Tahmasp then handed the prince over to the Ottoman ambassador . Shortly afterwards, Bayezid was killed by agents sent by his own father . </P>

Who took shelter under the safavid empire and why