Rayta bint al-Saffah was an Abbasid princess and the first wife of the future caliph al-Mahdi. Her father, al-Saffah, founded the Abbasid caliphate and ruled from 750 to 754. Her mother, Umm Salama, belonged to the Quraysh’s Makhzum clan. Rayta was still young when her father died, and her uncle al-Mansur then led the dynasty for nearly 22 years.
In 761, after al-Mahdi returned from Khurasan, he married Rayta. They had 2 sons, Ubaydallah and Ali. Rayta became his most influential wife until he married al-Khayzuran bint Atta, a woman of Yemenite origin who had been born in the Hejaz.
Al-Khayzuran’s influence altered Rayta’s position at court. She persuaded al-Mahdi to free and marry her, and to replace Rayta’s son as heir with her own sons, despite the custom against naming sons of enslaved women as heirs. Rayta’s maternal half-brother, Sa'id ibn Maslama, was the grandson of Umayyad caliph Hisham and became an early Abbasid-period transmitter of historical tradition.