Upon his succession as Caliph in 775, she managed to convince him to free her and marry her, depriving his first spouse, princess Rayta, daughter of Caliph Al-Saffah, of her privileges: she also convinced him to deprive his son in his first marriage from the position of heir to the throne, and instead name her sons as heirs, despite the fact that the custom at that time did not allow for the sons of a slave to be named heirs.