section_path: Foreign relations/Relations with the Safavid dynasty
section_name: Relations with the Safavid dynasty
paragraph_text: Relations with the Safavid dynasty
  
  Before Akbar's rule, the Safavids and the Mughals had a long history of diplomatic relations. The Safavid ruler Tahmasp I provided refuge to Humayun when he was forced to flee the Indian subcontinent following his defeat by Sher Shah Suri. However, the Safavids differed from the Sunni Mughals and Ottomans in following the Shia branch of Islam.
  
  One of the longest-standing disputes between the Safavids and the Mughals pertained to control of the city of Qandahar in the Hindukush region, which formed the border between the two empires. Military strategists of the time considered the region to be militarily significant due to its geography. The city, which was administered by Bairam Khan at the time of Akbar's accession, was invaded and captured by the Persian ruler Husain Mirza, a cousin of Tahmasp I, in 1558. Shortly afterwards, Akbar's army completed its annexation of Kabul, and to further secure the north-western boundaries of his empire, it proceeded to Qandahar. The city capitulated without resistance on 18 April 1595, and the ruler Muzaffar Hussain joined Akbar's court. Subsequent to this, Bairam Khan sent an envoy to the court of Tahmasp I in an effort to maintain peaceful relations with the Safavids. This gesture was reciprocated and a cordial relationship prevailed between the two empires during the remainder of the first two decades of Akbar's reign. The death of Tahmasp I in 1576 resulted in civil war and instability in the Safavid empire, and diplomatic relations between the two empires ceased for more than a decade. They were restored only in 1587 following the accession of Shah Abbas to the Safavid throne. Diplomatic relations continued to be maintained between the Safavid and Mughal courts until the end of Akbar's reign. Qandahar continued to remain in Mughal possession, and the Hindukush was the empire's western frontier for several decades until Shah Jahan 's expedition into Badakhshan in 1646.