First was the Russian influence at the Iranian court, which prompted the Russians to support Iran in its attempt to take Herat, historically the western gateway to Afghanistan and northern India. In 1837 Iran advanced on Herat with the support and advice of Russian officers. The second immediate reason was the presence in Kabul in 1837 of a Russian agent, Yan Vitkevich, who was ostensibly there, as was the British agent Alexander Burnes, for commercial discussions.