When Abdul Rahman Khan took the throne of Afghanistan in 1880, he inherited the terms of the 1878 Treaty of Gandamak, which made Afghanistan a British protectorate. The treaty, amongst other provisions, surrendered control over Afghan foreign relations to the British and allowed for a British mission, with European members, to reside in Kabul. Abdul Rahman Khan was able to alter the terms of the treaty to provide that all members of the British mission be Indian Muslims but was otherwise stuck with the treaty in its entirety.