The Siege of Herat (1837-1838) was an unsuccessful attack on the Afghan city of Herat, by the Qajar dynasty of Persia, during the time of the Great Game. The siege ended after neither side gained a clear advantage, the British threatened to take military action and the Russians withdrew their support. Herat was held by Kamran and his vizier Yar Mohammed. The Shah of Persia was Mohammed Shah Qajar. Four Europeans were involved: Sir John McNeill and Eldred Pottinger for the British and Count Simonich and Yan Vitkevich for the Russians.
Before the fall of the Persian Safavid Dynasty, Herat was part of the larger Khorasan area of the greater Persian Empire. In 1747, the Afghan Durrani Empire, broke from Persia during a loya jirga (grand council). After a few decades of chaos, Iran was reunited by the Qajars, who made an effort to reconquer Afghanistan. Starting in 1816, Qajar Dynasty managed to capture Herat, but retreated afterwards as there was no military advantage.
In August 1837, Eldred Pottinger (an Anglo-Indian explorer, diplomat and officer of the Bengal Artillery) entered Herat in disguise. At this time, Herat was officially held by a Sadozai man named Kamran, though his vizier Yar Mohammed exercised the real political power. Soon there were rumors that a large Persian force, led by the Shah with Russian advisors, was advancing on Herat. Kamran hurried back to his capital and began strengthening its defenses. Pottinger presented himself to Kamran's Vizier, Yar Mohammed, and was accepted as an adviser.
The siege began in November 1837 when the new Shah, Mohammed Mirza, arrived before Herat. His intention was to take Herat then move on to Kandahar. With him was the Russian Envoy Count Simonich, seconded Russian officers and a regiment of Russian deserters under the Polish general Berowski. Pottinger stiffened the defences of Herat and despite the presence of the Russian advisers the siege lasted eight months.