But when Ayub Khan, who had meanwhile retreated to Herat, heard that the British forces had retired, early in 1881, to India, he mustered a fresh army and again approached Kandahar.
In that year Ayub Khan made a fruitless inroad from Persia; and in 1888 the amir's cousin, Ishak Khan, rebelled against him in the north; but these two enterprises came to nothing.
Some general idea of the resources of the Kandahar district may be gathered from the fact that it supplied the British troops with everything except luxuries during the entire period of occupation in 1879-81; and that, in spite of the great strain thrown on those resources by the presence of the two armies of Ayub Khan and of General Roberts, and after the total failure of the autumn crops and only a partial harvest the previous spring, the army was fed without great difficulty until the final evacuation, at one-third of the prices paid in Quetta for supplies drawn from India.
In July 1880, a few days after the proclamation of Abdur Rahman as amir at Kabul, came news that Ayub Khan, Shere Ali's younger son, who had been holding Herat since his father's death, had marched upon Kandahar, had utterly defeated at Maiwand a British force that went out from Kandahar to oppose him, and was besieging that city.
The evacuation of Afghanistan was settled on the terms proposed, and in 1881 the British troops also made over Kandahar to the new amir; but Ayub Khan, one of Shere Ali's sons, marched upon that city from Herat, defeated Abdur Rahman's troops, and occupied the place in July.
Yahya Khan, Mushir-ad-daulah, the Persian minister for foreign affairs (died 1892), who was supposed to have connived at Ayub Khans escape in order to please his Russian friends, was dismissed from office.