Second Anglo-Afghan War, 1878-1880
See also: Second Anglo-Afghan WarAfter tension between Russia and Britain in Europe ended with the June 1878 Congress of Berlin, Russia turned its attention to Central Asia. That same summer, Russia sent an uninvited diplomatic mission to Kabul. Sher Ali tried, but failed, to keep them out. Russian envoys arrived in Kabul on 22 July 1878 and on 14 August, the British demanded that Sher Ali accept a British mission too.
The amir not only refused to receive a British mission but threatened to stop it if it were dispatched. Lord Lytton, the viceroy, ordered a diplomatic mission to set out for Kabul in September 1878 but the mission was turned back as it approached the eastern entrance of the Khyber Pass, triggering the Second Anglo-Afghan War. A British force of about 40,000 fighting men was distributed into military columns which penetrated Afghanistan at three different points. An alarmed Sher Ali attempted to appeal in person to the tsar for assistance, but unable to do so, he returned to Mazari Sharif, where he died on 21 February 1879.
With British forces occupying much of the country, Sher Ali's son and successor, Mohammad Yaqub Khan, signed the Treaty of Gandamak in May 1879 to prevent a British invasion of the rest of the country. According to this agreement and in return for an annual subsidy and vague assurances of assistance in case of foreign aggression, Yaqub relinquished control of Afghan foreign affairs to the British. British representatives were installed in Kabul and other locations, British control was extended to the Khyber and Michni passes, and Afghanistan ceded various frontier areas and Quetta to Britain. The British army then withdrew. Soon afterwards, an uprising in Kabul led to the slaughter of Britain's Resident in Kabul, Sir Pierre Cavagnari and his guards and staff on 3 September 1879, provoking the second phase of the Second Afghan War. Major General Sir Frederick Roberts led the Kabul Field Force over the Shutargardan Pass into central Afghanistan, defeated the Afghan Army at Char Asiab on 6 October 1879 and occupied Kabul. Ghazi Mohammad Jan Khan Wardak staged an uprising and attacked British forces near Kabul in the Siege of the Sherpur Cantonment in December 1879, but his defeat there resulted in the collapse of this rebellion.
Yaqub Khan, suspected of complicity in the massacre of Cavagnari and his staff, was obliged to abdicate. The British considered a number of possible political settlements, including partitioning Afghanistan between multiple rulers or placing Yaqub's brother Ayub Khan on the throne, but ultimately decided to install his cousin Abdur Rahman Khan as emir instead. Ayub Khan, who had been serving as governor of Herat, rose in revolt, defeated a British detachment at the Battle of Maiwand in July 1880 and besieged Kandahar. Roberts then led the main British force from Kabul and decisively defeated Ayub Khan in September at the Battle of Kandahar, bringing his rebellion to an end. Abdur Rahman had confirmed the Treaty of Gandamak, leaving the British in control of the territories ceded by Yaqub Khan and ensuring British control of Afghanistan's foreign policy in exchange for protection and a subsidy. Abandoning the provocative policy of maintaining a British resident in Kabul, but having achieved all their other objectives, the British withdrew.
Read more about this topic: European Influence In Afghanistan