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 1838 and 1842.
In 1868, Mohammad Afzal Khan was himself overthrown and replaced as Emir by Sher Ali, who returned to the throne after spending few short years in exile in Russia.
Subsequently, the British marched on 21 November 1878 into Afghanistan and Emir Sher Ali was forced to flee again to Russia, but he died in 1879 in Mazar-i-Sharif.
[7] His successor, Mohammad Yaqub Khan, sought solutions for peace with Russia and gave them a greater say in Afghanistan's foreign policy.
The British, in 1893, forced Afghanistan to consent to a new border, termed the Durand Line, which cuts right through the historic Pashtun settlement region.
Habibullah Khan sought reconciliation with the UK, where he graduated in 1905 with a peace treaty with Russia, stretching for defeat in the Russo-Japanese War had to withdraw from Afghanistan.