The Emirate of Afghanistan, known as the Emirate of Kabul until 1855, was an emirate in Central Asia and South Asia that encompassed present-day Afghanistan and parts of present-day Pakistan (before 1893). The emirate emerged from the Durrani Empire, when Dost Mohammad 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 European influence in Afghanistan. The Emirate of Afghanistan continued the Durrani Empire's war with the Sikh Empire, losing control of the former Afghan stronghold of the Valley of Peshawar at the Battle of Nowshera on 14 March 1823. This was followed in 1839 by the First Anglo-Afghan War with British forces. The war eventually resulted in victory for Afghans, with the British withdrawal and Dost Mohammad being reinstalled to the throne. However, during the Second Anglo-Afghan War (1878-1880), the British and Afghans signed the Treaty of Gandamak, which allowed the British to assume control of the Afghan territories within modern-day Pakistan as well as of Afghanistan's foreign affairs, on the condition that a subsidy be paid to the Afghans and the British military fully withdraw. Emir Amanullah Khan signed the Anglo-Afghan Treaty of 1919 following the Third Anglo-Afghan War, gaining full Afghan independence. In 1926, Amanullah Khan reformed the country as the Kingdom of Afghanistan, becoming its first King. History Escalated a few years after the establishment of the emirate, the Russian and British interests were in conflict between Muhammad Shah of Iran and Dost Mohammad Khan, which led to the First Anglo-Afghan War, fought between 1839 and 1842. During the war, Britain occupied the capital, Kabul, of the then called Emirate of Kabulistan, in an effort to prevent Afghanistan from coming under Russian control and curb Russian expansion, while also keeping Afghanistan in the British fold under a puppet leader, Shah Shujah Durrani. The war ended with Dost Mohammad returning to the throne, with the British withdrawing; unable to subjugate the country, they forged greater ties instead, allowing Dost Mohammad to move toward uniting the dis-united state of Afghanistan, which split from the Durrani Civil wars brought on by the sons of Timur Shah. Upon the death of Dost Mohammad in 1863, he was succeeded by his son, Sher Ali Khan. However, three years later, his older brother