The struggle to ensure the survival of the Iranian state in the eighteenth century conditioned foreign policy. Before discussing the interaction of events and policy we must first note the collapse of the state in 1722, when Iran’s independence was destroyed. The ignominious downfall of the Safavi dynasty during that year marked the culmination of a long era of decline. It was no coincidence that the end of the dynasty came after the reign of Shah Sultan Husayn (1694-1722), the most inept policy maker Iran had ever known. His ill-advised policies precipitated the disaster of 1722. The Ghalzai tribe, the most powerful tribe of Qandahar, had been subjected to the repressive measures of the Shah’s agents for several years. Mir Ways, a leading chief of the tribe, decided in 1711 to defy the Shah and to protest his “intolerable” measures. His son, Mahmüd, went so far as to march the Afghan troops toward Isfahan, the capital of Iran. The struggle between Qandahar and Isfahan finally resulted in the occupation of the latter by Afghan forces in 1722. The collapse of the government and the confusion that ensued presented Turkey, the traditional foe, and Russia, a new enemy, with a most propitious opportunity for aggrandizement. The Turkish invasion of Iran was in part motivated by the desire to compensate for territorial losses in the west by gaining new dominions in the east. Shortly before the invasion of Iran, Turkey had suffered enormous territorial losses at the hands of European powers. Turkish losses in 1699 and again in 1718 were reflected in the historic treaties of Carlowitz and Passarowitz. The memories of territorial conquests at the expense of Iran as well as of Egypt and Syria in the sixtenth century were encouraging. In eight years Turkey had gained as much territory in the Middle East as it had conquered elsewhere within the two preceding centuries.26 This had taken place when a relatively powerful Iran had just been established. The prospects for territorial expansion were still more inviting in the 1720’s, when Iran was torn by internal dissensions and paralyzed by the Afghan occupation (Source: The Foreign Policy of Iran).