Though the Safavids acknowledged Ottoman rule over Iraq in the Treaty of Zuhab (1639), they were occasionally tempted to attempt to regain it, for instance after the Ottoman defeat at Vienna in 1683. More cautious and conservative factions, aware of the decline in Safavid military strength, prevailed against it.[2] Relations remained fraught around Basra due to the continuous harassment of Iranian pilgrims by the Ottoman authorities, so that the Safavids even prohibited the passage of pilgrims on several occasions.[2] Furthermore, upheavals in southern Iraq continued to spill over the border into Safavid territory. Thus in 1667, when Husayn Pasha of the Afrasiyab dynasty refused to acknowledge the suzerainty of the Sultan and the Ottomans sent a punitive expedition against him, Husayn Pasha evacuated the entire population to Safavid territory while offering the city to the Safavids.[2][8] Shah Suleiman I (r. 1666–1694), however, dismissed Husayn Pasha's pleas as he did not want to antagonize the Ottomans,[2] and in 1668, the Ottoman governor of Baghdad established direct control over Basra.[1]