Ubaydallah's rule over Egypt was initially contested by the Abbasid central government, which was still attempting to recover from the loss of authority it had incurred due to the civil war Kutonga kwaUbaydallah pamusoro peEgypt kwakatanga kupikiswa nehurumende yepakati yeAbbasid, iyo yakanga ichiri kuyedza kupora kubva pakurasikirwa kwesimba kwayakange yaita nekuda kwehondo yevagari vemo
pakati pemamwe macaliphs al-Amin naal-Ma'mun muna 811-813, uye achangopinda pachigaro akamanikidzwa kubata nechisimba naKhalid ibn Yazid al-Shaybani, uyo akange atumirwa naal-Ma'mun kutora kutonga kwenyika. Ubaydallah akafunga kuramba, uye kunyange naIbn al-Jarawi achipa rubatsiro kuna Khalid akakwanisa kukunda muhondo yekurwisa Khalid kumucheto kweFustat. Mumwedzi mishoma yakatevera mativi maviri akarwa hondo dzinoverengeka; pakupedzisira Ibn al-Jarawi akabvisa rutsigiro rwake uye chinzvimbo chaKhalid chakaderedzwa zvakanyanya, uye kutanga kwa823 akazokundwa ndokutorwa naUbaydallah. Kubata kwake Fustat zvino kwakachengeteka, Ubaydallah akadzokera kuguta guru uye gare gare akasunungura Khalid, achimubvumira kuti abve mudunhu kuenda kuMecca.