Al-Mahdi, whose name means "Rightly-guided" or "Redeemer", was proclaimed caliph when his father was on his deathbed. His peaceful reign continued the policies of his predecessors.
Rapprochement with the Shi'ite Muslims in the Caliphate occurred under al-Mahdi's reign. The powerful Barmakid family, which had advised the Caliphs since the days of al-'Abbas as viziers, gained even greater powers under al-Mahdi's rule, and worked closely with the caliph to ensure the prosperity of the Abbasid state.
The cosmopolitan city of Baghdad blossomed during al-Mahdi's reign. The city attracted immigrants from all of Arabia, Iraq, Syria, Persia, and lands as far away as India and Spain. Baghdad was home to Christians, Jews, Hindus, and Zoroastrians, in addition to the growing Muslim population. It became the world's largest city.
Al-Mahdi continued to expand the Abbasid administration, creating new diwans, or departments, for the army, the chancery, and taxation. Qadis or judges were appointed, and laws against non-Arabs were dropped.
The Barmakid family staffed these new departments. The Barmakids, of Persian extraction, had originally been Buddhists, but shortly before the arrival of the Arabs, they had converted to Zoroastrianism. Their short-lived Islamic legacy would count against them during the reign of Haroun al-Rashid.
The introduction of paper from China (see Battle of Talas) in 751, which had not yet been used in the West – the Arabs and Persians used papyrus, and the Europeans used vellum – had a profound effect. The paper industry boomed in Baghdad where an entire street in the city center became devoted to sales of paper and books. The cheapness and durability of paper was vital to the efficient growth of the expanding Abbasid bureaucracy.
Al-Mahdi had two important religious policies: the persecution of the zanadiqa, or dualists, and the declaration of orthodoxy. Al-Mahdi singled out the persecution of the zanadiqa in order to improve his standing among the purist Shi'i, who wanted a harder line on heresies, and found the spread of syncretic muslim-polytheist sects to be particularly virulent. Al-Mahdi declared that the caliph had the ability – and indeed, the responsibility – to define the orthodox theology of Muslims, in order to protect the umma against heresy. Although al-Mahdi did not make great use of this broad, new power, it would become important during the 'mihna' crisis of al-Ma'mun's reign.
Banuqa had her own palace in the grounds of the royal palace in Baghdad. Beautiful and elegant, she was her father's favourite daughter. The caliph allowed her to ride in his own retinue, disguised in male attire and carrying a sword. She died tragically young, and contemporary poets produced many elegiac works to honour her memory.
In the words of Ibn_Khallikan (CE 1211-1282):
This prince had great talent as a singer and an able hand on musical instruments; he was also an agreeable companion at parties of pleasure. Being of dark complexion, which he inherited from his mother, Shikla- who was a Negro-he received the name "At-Thinnin" (the Dragon).
Al-Masudi (p. 34f) relates some anecdotes in his Meadows of Gold that illumine a little the character of this caliph. There is the story of al-Mahdi out hunting stopping to take a simple meal from a peasant. With him on this occasion was one companion who felt the peasant should be punished for serving such food. Al-Mahdi rewarded the peasant.
Another tale has the caliph dining with a bedouin unaware of the identity of his guest. After tasty food the bedouin offers al-Mahdi liquid refreshment. Progressively al-Mahdi tells the bedouin that his guest is one of the caliph's eunuchs, one of the caliph's generals and then the caliph himself. The bedouin says no more for you. Next you'll be claiming you're the Messenger of God.
Al-Mahdi alarmed his treasurer by charitably spending the vast amount that al-Mansur had left him. However, the caliph was unconcerned and, indeed, incoming revenue soon arrived, enabling his bounty to continue. His generosity was compared to the waves of the sea.
Just before his death, al-Mahdi is supposed to have had a supernatural visitation who recited to the caliph ominous verses.
Al-Masudi The Meadows of Gold, The Abbasids, transl. Paul Lunde and Caroline Stone, Kegan Paul, London and New York, 1989