The Islamic Republic of Afghanistan, formerly the Emirate of Afghanistan (Pashto: د افغانستان امارت Da Afghānistān Amārat), is a landlocked country located within central Asia.
The emirate emerged from the Durrani Empire, when Dost Mohammed Khan, the founder of the Barakzai dynasty in Kabul, prevailed. The history of the Emirate was dominated by 'the Great Game' between the Russian Empire and the United Kingdom for supremacy in Central Asia. This period was characterized by the expansion of European colonial interests in South Asia. The Emirate of Afghanistan continued the war with the Sikh Empire, which led to the invasion of Afghanistan by British-led Indian forces who completely wiped out the Afghans in 1842 but did not fulfill their initial war objectives.
The future Templar Cavanagh served the British Army as a corporal in Afghanistan during the 1842 retreat from Kabul to Jalalabad but deserted a day into the conflict alongside Colonel Walter Lavelle to ensure his own survival.
However, during the Second Anglo-Afghan War, the British again defeated the Afghans and this time the British took control of Afghanistan's foreign affairs until Emir Amanullah Khan regained them after the Anglo-Afghan Treaty of 1919 was signed following the Third Anglo-Afghan War.