Kaydar appears to have been of Soghdian descent,[1] and he was considered a client of the Commander of the Faithful (mawla amir al-mu'minin).[2] He was appointed to the governorship of Egypt by the caliph al-Ma'mun (r. 813–833) following the latter's visit to the province in February 832. The caliph also sent a "foreigner" (ajam) named Ibn Bistam to serve as chief of security (shurtah), but Kaydar dismissed him over charges of bribery and ordered him to be whipped in the mosque, after which he appointed his own son Muzaffar to lead the shurtah instead.[3]