Abdur Rahman had been almost twelve years in Russian exile, and wore a Russian uniform when he rode to Kabul. The British gambled that he would resist any Russian interference in his affairs just as fiercely as his predecessors had resisted the British. The success of this gamble, which made Afghanistan a buffer state between Russia and British India, was in no small measure due to the wisdom of the Amir himself, for he understood very well the role he was to play.
During his reign the British and Russians reached a settlement of the whole long border between Russian and Afghanistan from the Pamirs to Iran. The border between Afghanistan and British India to the southeast was also demarcated by the famous Durrand Line, which clarified the respective areas in which the Afghans and the British would be responsible for controlling the Pushtun tribes living on the frontier.
Abdur Rahman's achievement during his reign were impressive. His main task was the integration of rebellious tribes into a single polity. He weakened the autonomy of the tribes by transferring many of the military and administrative functions of the chiefs to the central government. He transferred loyal tribesmen as settlers into rebellious regions, and crushed the Hazaras and Nuristanis (formerly known as Kafirs or atheists) by invading their lands. He converted the Nuristanis by sword-point to Islam.
In 1901 Abdur Rahman's eldest son, Habibullah, his chosen and trained heir, succeeded his father. Habibullah continued his father's isolationist policy and consistently rejected all attempts by foreign interests to gain concessions in Afghanistan. During the years that Habibullah ruled Afghanistan, however, he introduced western medicine, abolished slavery, and founded a college on European lines.