Mahmud was reinstated by Fateh Khan, whom he appointed his vizier, and whose nephews, Dost Mahommed Khan and Kohn dil Khan, he placed respectively in the governments of Kabul and Kandahar.
About this time Kohan Dil Khan, one of the chiefs of Kandahar, died, and Dost Mahommed of Kabul annexed the city to his territory.
This duty was successfully performed until 1863, when, during the temporary absence of Major Malcolm Green, the then political agent, Khodadad Khan was, at the instigation of some of his principal chiefs, attacked while out riding by his cousin, Sher dil Khan, and severely wounded.
Khodadad fled in safety to a residence close to the British border, and Sher dil Khan was elected and proclaimed Khan.
He was succeeded by his brother, Mir Khodadad Khan, when a youth of twelve years of age, who, however,'did not obtain his position before he had put down by force a rebellion on the part of his turbulent chiefs, who had first elected him, but, not receiving what they considered an adequate reward from his treasury, sought to depose him in favour of his cousin Sher dil Khan.