Back in Samarra, reconciliation between the Turks and the caliphs had begun during the reign of al-Mu'tamid (870–892). Al-Mu'tamid's brother, al-Muwaffaq, was the driving force behind this success; he had good relations with the Turkish leaders such as Musa bin Bugha and he gradually gained more and more power until he was the actual administrator of the empire. Musa bin Bugha held the governorships of several of the eastern provinces, but his failure to make any headway against the rebels caused him to resign from these governorships in frustration, after which al-Muwaffaq took over the positions.