[2][3] He also led the Afghan troops during the Second Anglo-Afghan War and defeated the British Indian Army at the Battle of Maiwand.
[10] During the second Anglo-Afghan war, Afghans under the command of Ayub Khan clashed with Anglo-Indian troops at Maiwand on 27 July 1880 and emerged victorious.
On 1 September, 1880, he was defeated and routed by forces led by General Frederick Roberts at the Battle of Kandahar, which saw the end of the Second Anglo-Afghan War.
Despite significant challenges, including a shortage of funds and rebellious troops, Ayub Khan set out for Kandahar in July 1881.
Ayub Khan emerged victorious, seized the capital, and briefly ruled the province for the first time.
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.
El-Effendi was captured when his 11th Prince Albert Victor's Own Cavalry (PAVO) was overrun by German Afrika Korps, but managed to escape and rejoin his regiment.
[citation needed] One of his sons, Sardar Azmarai Javaid Hissam el-Effendi, was a professional polo player.