 After Rafi' was defeated and killed in 896 they were captured by 'Amr, who however treated them well.Following 'Amr's capture by the Samanids in 900, the slave ("ghulam") commander Sebük-eri began establishing ties with al-Layth, who had gone into hiding in Sistan.As the son of 'Ali, who had originally been designated as the successor to Ya'qub ibn al-Layth al-Saffar, he was a possible contender for the amirate, and gained supporters in the army.