Al-Mahdi, born on August 3, 744, was the 3rd Abbasid caliph. The son of al-Mansur, he took the throne in 775 after his father’s death and ruled until his own death on July 24, 785. As a young man, he led campaigns in Khorasan and Tabaristan; later, while serving as governor of the eastern provinces, he was based in Ray. He was also appointed to lead the annual pilgrimage to Mecca.
His reign combined administrative expansion with investment in religious sites and Baghdad. He enlarged the Prophet’s Mosque in Medina and the Masjid al-Haram in Mecca, and rebuilt Al-Aqsa Mosque. He expanded the government and postal service, strengthened intelligence and judicial systems, and supported Baghdad’s cultural and economic life. A patron of poetry and music, he encouraged artists at court; his children Ibrahim and Ulayya also became known as poets and musicians.
Al-Mahdi sought to ease tensions with political groups, releasing prisoners and restoring property to many Umayyads and Alids. He appointed his son Musa al-Hadi as heir, while his other son Harun led military campaigns against the Byzantine Empire. Abbasid forces also faced uprisings in Khurasan and Tabaristan. In 783, al-Mahdi established an inquisition that led to the execution of people accused of heresy. He died in Masabadhan under circumstances described as suspicious and was succeeded by al-Hadi.