The independent rulers of Herat always turned to the Iranians for support against re-absorption into the Afghan kingdom.
After complicated negotiations between Shah Nasr ed-Din and local Afghan provincial rulers, and despite British warning, Persian troops occupied Herat in October 1856. The British, whose policy it was to maintain the independence of this city, declared war against Iran. After three months the Iranians withdrew from Herat and committed themselves never again to interfere there or elsewhere in Afghanistan. This brief war convinced the British that they should bolster the strength of Dost Mohammad, the ruler of Afghanistan, in an attempt to enable him to meet future challenges by the Iranians. In 1857 an addendum was signed to the 1855 treaty that permitted a British military mission to go to Qandahar (but not to Kabul) and to provide a subsidy during conflict with the Iranians. Fraser-Tytler notes that as Dost Mohammad signed the document he proclaimed, "I have now made an alliance with the British Government and come what may I will keep it till death."
The British governor general of India at the time of the 1857 agreement with Afghanistan stated in a memorandum that the British would never again intervene in Afghan internal affairs or send an army across its borders unless Herat was besieged, and then only with Afghan consent. He went so far as to argue in favor of the Afghan absorption of Herat. In 1863 Dost Mohammad retook Herat with British acquiescence.