Maiwand was the biggest defeat for the Anglo-Indian army in the second Anglo-Afghan war. He went on to besiege the better equipped British forces at Kandahar but did not succeed. On September 1, 1880, he was defeated and routed by forces led by GeneralFrederick Roberts at the Battle of Kandahar, which saw the end of the Second Anglo-Afghan War.
After second Anglo-Afghan war
A year later Ayub again tried to take Kandahar, this time from AmirAbdur Rahman Khan but again failed. He escaped to Persia. After negotiations in 1888 with Sir Mortimer Durand, the ambassador at Tehran, Ayub Khan became a pensioner of the British Raj. A political officer, William Evans-Gordon, took charge of him on his arrival in India and escorted him with his entourage from Karachi to Rawalpindi. He lived in India until his death in 1914.
Death
He died in Lahore in 1914 and is buried in Peshawar near the shrine of Sheikh Habib at Durrani graveyard in Peshawar, Pakistan.
Legacy
In Afghanistan, he is remembered as "National Hero of Afghanistan". He had eleven wives, fifteen sons and ten daughters.
Sardar Abdul Samad Khan Bahadur was the fifth son of Ayub Khan. He was born in Rawalpindi, British India on 10 August 1893. He joined Punjab civil service in 1921 and became Magistrate of Punjab. Later he served as city Magistrate of Delhi from 1941 to 1943 and Deputy Commissioner of Gujarat from 1943 to 1948. He retired from Indian Civil Service in 1948 and migrated to Pakistan, where he was re-employed as PCS in 1949 and served as Deputy Commissioner of Sialkot in 1949. He was granted a personal title of "Khan Bahadur" on 1st January 1941. He first married Hajira Begum, daughter of Mohammad Yaqub Khan and later Qudsia Begum.
Sardar Hissam Mahmud el-Effendi
Sardar Hissam Mahmud el-Effendi was a grandson of Ayub Khan. He was the son of Sardar Muhammad Abdul Qadir Khan Effendi, who was the first son of Ayub Khan. He completed his education from Rashtriya Indian Military College in Dehra Dun and was commissioned as Second lieutenant on 15 July 1939 in British Indian Army. He fought in World War 2 and was initially posted in North Africa. He was captured when his 11th Prince Albert Victor's Own Cavalry was overrun by German Afrika Korps but managed to escape and rejoin his regiment. Later he fought in Burma Campaign. He was promoted to the rank of Lieutenant in 1940, Captain and temporary Major in 1946. Following the independence of Pakistan, Hissam Mahmud el-Effendi opted to join Pakistan and later joined Pakistan Army. He took part in Indo-Pakistan war of 1965 as a special advisor to the General officer commanding of the 6th division. He was also a Polo player and organised Pakistan Polo for over twenty years with leading teams invited to play from abroad. He died in 1983 in Lahore and had two sons. One of his son, Sardar Azmarai Javaid Hissam el-Effendi, was a professional polo player. He also coached Pakistan Polo team from 2003 to 2007 and was awarded Tamgha-e-Imtiaz in 1996 by the government of Pakistan.
Sardar Muhammad Ismail Khan
Sardar Muhammad Ismail Khan was a grandson of Ayub Khan and also a Brigadier in Pakistan Army. He was an acting General officer commanding of 15th Infantry Division during the Indo-Pakistan war of 1965. He was the son of Sardar Muhammad Akram Khan, who was the third son of Ayub Khan.