On November 22, 1837, Mohammed, Shah of Persia, laid siege to the city of Herat, historically the western gateway to Afghanistan and northern India. Russian officers provided support and advice to the Iranian army. Herat was defended by an Afghan garrison, under Yar Mohammed. After a somewhat desultory siege, an attempt was made to storm the place on June 24, 1838. The Persians were repulsed with a loss of 1700 men. From this time a tacit armistice existed till September 9, 1838, when the Shah withdrew his army. The defenders of Herat are estimated to have lost about 1000, while the Persians lost about 2000.
The British, fearful that Persia was falling completely under Russian influence, entered into alliances with the rulers of Herat, Kabul, and Qandahar. A British mission to Kabul under Captain (later Sir) Alexander Burnes in 1837 was welcomed by Dost Mohammad, who hoped the British would help him recover Peshawar. Burnes could not give him the required assurances; and when a Russian agent, Captain P. Vitkevich, appeared in Kabul, the British left for India. Dost Mohammad began negotiations with Vitkevich.