 After the revolt, Ibadin established a number of theocratic tribal kingdoms, most of which had short and troubled histories.But others, like Sijilmasa and Tlemcen, which straddled the principal trade routes, proved more viable and prospered.In 750, the Abbasids, who succeeded the Umayyads as Muslim rulers, moved the caliphate to Baghdad and reestablished caliphal authority in Ifriqiya, appointing Ibrahim ibn al Aghlab as governor in Kairouan.