On February 20, 1919, Habibullah Khan, the leader of Afghanistan who struggled to keep his country neutral in World War I was assassinated. Habibullah had succeeded his father, Abd-ar-Rahman, as amir in 1901 and immediately began to bring much-needed reforms and modernization to his country. Located between British-held India and Russia, Afghanistan had in the past clashed repeatedly with its neighbors, including two Afghan Wars against Anglo-Indian forces during the 19th century. Many within Afghanistan saw these conflicts as part of the fundamental and necessary defense of Muslims against the encroachments of Christians. Though the British and Russian governments signed a convention in 1907 pledging respect for the territorial integrity of Afghanistan, many Afghans, including Habibullah felt insecure between such powerful neighbors and resented the lack of Afghan representation at the creation of the convention and the effective control Britain still exercised over the country's foreign affairs due to its active involvement in the region.
Convinced, however, that the continued improvement and modernization of Afghanistan depended on economic assistance from powerful Western countries like Britain, Habibullah maintained his country's neutrality after the outbreak of World War I, despite pressure from Turkish and other Islamic leaders urging Afghanistan to enter the war against the Allies. By maintaining his country's neutrality and Afghanistan's anti-war policy, Habibullah enraged many of his young anti-British countrymen who viewed World War I as a holy war. Many Afghans felt particularly strongly that Habibullah failed to capitalize on the weakness of Russia, which was overtaken by the Bolsheviks in November 1917, by uniting the Muslim peoples of Central Asia and liberating them from non-Muslim rule.
Barely a year after Turkey's defeat at the hands of the Allies and the end of the war in November 1918, Habibullah's opponents, angry at what they saw as his betrayal of Muslim interests in favor of pandering to Britain, plotted and carried out his assassination. Habibullah had not declared a successor and after his death, his brother, Nasrullah Khan, held the throne for six days before being deposed by the Afghan nobility in favor of Habibullah's third son, Amanullah Khan. Determined to extract Afghanistan completely from Britain's influence, Amanullah declared war on Great Britain in May 1919, beginning what became known as the Third Afghan War. The British, preoccupied by India's burgeoning independence movement, negotiated a peace treaty with Afghanistan the following August at Rawalpindi, recognizing Afghanistan's status as a sovereign and independent state.