Habibullah Khan (June 3, 1872–February 20, 1919) ruled Afghanistan as emir from 1901 until his assassination. Born in Samarkand to a Pashtun family, he was the eldest son of Emir Abdur Rahman Khan and succeeded his father by primogeniture. His grandfather was Mohammad Afzal Khan.
Habibullah pursued modernization, introducing modern medicine and technology, establishing Habibia High School and a military academy in 1903, and making legal changes that repealed some of the harshest criminal penalties. He also granted amnesty to many people exiled by his father and dismantled his father’s internal intelligence organization. His rule, however, included religious discrimination: a 1901 law required Hindu men to wear yellow turbans and women to wear yellow veils in public. In 1903, his adviser Abdul Latif was executed for apostasy.
In 1909, Habibullah responded to a petition for constitutional government by accusing its signatories of plotting against him. He executed 7 leaders and imprisoned others. A 1912 rebellion in Khost, led by rival claimant Jehandad Khan, ended after the government granted concessions. Abroad, Habibullah kept Afghanistan neutral during World War I despite pressure from the Ottoman Empire and a German mission. He signed a treaty of friendship with British India in 1905 and made a state visit there in 1907.
After surviving an attempted shooting in Kabul in 1918, Habibullah ordered an investigation that implicated political opponents and his son Amanullah Khan, though the accusation against Amanullah was disregarded. In early 1919, while staying at Kalagosh in Laghman Province, Habibullah was shot and killed by Shuja-ud-Daula Ghorbandi. His brother Nasrullah Khan briefly took power before Amanullah displaced and imprisoned him. Habibullah received the Knight Grand Cross of the Order of St Michael and St George in 1896 and the Knight Grand Cross of the Order of the Bath in 1907.