While the Afghan ruler, Dost Mohammad, was busy defeating an invasion by ex-shah Shuja in 1834, the Sikhs moved into territory ruled directly by Kabul. In 1836 Dost Mohammad declared a jihad, or Islamic holy war and an Afghan army advanced toward Sikh controlled Peshawar. Afghan forces under the command of Dost Mohammad's son, defeated the Sikhs at Jamrud, a post some 15 kilometers west of Peshawar. The Afghan leader, however, did not follow up this triumph by retaking Peshawar. Some sources suggest that the Sikh leader Ranjit Singh sowed dissension in Dost Mohammad's camp and the invading army melted away, and Peshawar was permanently lost to the Afghans.
Dost Mohammad decided to contact the British directly for help in dealing with the Sikhs. In the spring of 1836 he wrote the new governor general of India, Lord Auckland, a letter of congratulations and asked his advice on dealing with the Sikhs. Just as Dost Mohammad's letter formally set the stage for British intervention in Afghanistan, so also did Lord Auckland's reply foreshadow the duplicitous policy of the British in dealing with the Afghans. Auckland responded that he would send a commercial mission to Kabul and stated that "it is not the practice of the British Government to interfere with the affairs of other independent states."