# Al-Mahdi

Abū ʿAbd Allāh Muḥammad ibn ʿAbd Allāh al-Mahdī (Arabic: أبو عبد الله محمد بن عبد الله المنصور; 744 or 745 – 785), better known by his regnal name al-Mahdī (المهدي, "He who is guided by God"), was the third Abbasid Caliph who reigned from 775 to his death in 785. He succeeded his father, al-Mansur.

## Early life

Al-Mahdi was born in 744 or 745 AD in the village of Humeima (modern-day Jordan). His mother was called Arwa, and his father was al-Mansur. When al-Mahdi was ten years old, his father became the second Abbasid Caliph. When al-Mahdi was young, his father needed to establish al-Mahdi as a powerful figure in his own right. So, on the east bank of the Tigris, al-Mansur oversaw the construction of East Baghdad, with a mosque and royal palace at its heart. Construction in the area was also heavily financed by the Barmakids, and the area became known as Rusafa.
According to reports, he was tall, charming, and stylish; he had tan skin, a long forehead, and wavy hair. He loved women.
When he was 15 years old, al-Mahdi was sent to defeat the uprising of Abdur Rahman bin Abdul Jabbar Azdi in Khorasan. He also defeated the uprisings of Ispahbud, the governor of Tabaristan, and Astazsis, massacring more than 70,000 of his followers in Khorasan. These campaigns put Tabaristan, which was only nominally within the caliphate, firmly under Abbasid control. In 762 AD, al-Mahdi was the governor of the Abbasid Caliphate's eastern region, based in Ray. It was here that he fell in love with al-Khayzuran (translates as "bamboo"), a daughter of a warlord in Herat and had several children, including the fourth and fifth future Caliphs, al-Hadi and Harun al-Rashid. Around 770 AD (153 AH), al-Mahdi was appointed as Amir al-hajj. Al-Khayzuran was gifted to Mahdi by his father.

## Reign

Al-Mahdi's father, al-Mansur, died on the hajj to Mecca in 775. The throne then passed to al-Mansur's chosen successor, his son al-Mahdi. According to Marozzi, "[it] was, by the standards of the future, blood-soaked successions of the Abbasid caliphate, a model of order and decorum."
Al-Mahdi, whose nickname means "Rightly-guided" or "Redeemer", was proclaimed caliph when his father was on his deathbed. His peaceful reign continued the policies of his predecessors.
Mahdi commenced his rule by releasing several political prisoners, expanding and decorating the holy places of Mecca and Medina, and building fountains and lofts for Hajj pilgrims. He expanded the mail service, increased his secret service, fortified cities, and increased judicial appointments. His charitable giving was also impressive.
Rapprochement with the Alids in the Caliphate occurred under al-Mahdi's reign. The Barmakid family, which had advised the Caliphs since the days of Abu al-‘Abbās 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.
Al-Mahdi reigned for ten years. He imprisoned his most trusted vizier Ya'qub ibn Dawud. In the year 167 AH/ 783 AD, al-Mahdi instituted an official inquisition which led to the execution of alleged Zindiq (heretics). He was fond of music and poetry and during his caliphate many musicians and poets received his patronage and he supported musical expression and poetry across his dominion; accordingly, his son Ibrahim ibn al-Mahdi (779–839) and his daughter ‘Ulayya bint al-Mahdī (777-825) were both noted poets and musicians.
In 775, a Byzantine envoy, Tarath, travelled to Baghdad to convey the congratulations of the Byzantine emperor to al-Mahdi on his accession to the throne. Tarath was so pleased with the hospitality he received that he offered to put his engineering knowledge to use and build a mill that would generate annual profits, of 500,000 dirhams, equal to the cost of its construction. On completion, the envoy's forecast proved to be correct, and so, delighted, al-Mahdi ordered that all profits should be given to the envoy, even after he left Baghdad. It is believed this continued to his death, in 780.
In 775, Al-Fadl ibn Salih was appointed governor of the region of al-Jazira north of Damascus by the caliph al-Mahdi. He moved to al-Jazira the same year. Al-Fadl returned to Damascus following his trip to Jerusalem in 780 where he accompanied al-Mahdi as part of his entourage.
While the first Abbasid caliphs were distracted with cementing their authority, the Byzantines were occupied fighting Slavic clans in Macedonia and Thrace and battling the Bulgars. Once Mahdi felt secure in his rule, he fought the Byzantines with more force than his predecessors. He increased his line of control from Syria to the Armenian frontier and claimed the strategic town of Tarsus, that linked Anatolia, Syria, and northern Iraq.
In 777 AD (160 AH) he put down the insurrection of Yusuf ibn Ibrahim in Khurasan. In the same year al-Mahdi deposed Isa ibn Musa as his successor and appointed his own son Musa al-Hadi in his place and took allegiance (bayah) for him from the nobles.
Al-Mahdi released many Umayyads and 'Alids from prison and returned their wealth and property. His son Harun would also pursue similar policies, releasing many of the Umayyads and 'Alids his brother Al-Hadi had imprisoned and declaring amnesty for all political groups of the Quraysh.
Mahdi also embarked on two important military voyages, one in 779 and another in 781 with his son Harun. In this Mahdi was teaching and training his son to be the future Caliph, just as his father had prepared him.
Al-Mahdi was poisoned by one of his concubines in 785 AD (169 AH). The concubine's name was Hasanah and she was jealous of another female slave to who Mahdi was drawing closer. She prepared a dish of sweets and placed a poisonous pear at the top of the plate. The pit of the pear was removed and replaced with a lethal paste. She sent the dish to her adversary via a servant, however, Mahdi intercepted the plate and ate the pear without hesitation. Shortly afterward, he complained of stomach pain and died that night at 43 years old.
A separate account said al-Mahdi fell off his horse while hunting and died.

## Family

Al-Mahdi's first concubine when he was a prince was Muhayyat. In 759–60, she gave birth to a son who died in infancy. Another concubine was Rahim, who was the mother of his oldest surviving child, Abbasa. Another was al-Khayzuran bint Atta. She was the mother of caliphs al-Hadi and Harun al-Rashid. She had another son named Isa, and a daughter named Banuqah or Banujah. She was born in Mecca and brought up in Jurash. She had two sisters, Salsal and Asma, and a brother Ghitrif. She was al-Mahdi's favourite wife. In 761, al-Mahdi married Raytah as his first wife after his return from Khurasan. She was the daughter of Caliph al-Saffah and his wife Umm Salamah, a Makhzumite. She gave birth to two sons, Ubaydallah and Ali.
Another concubine was al-Bahtariyah, the noble-born daughter of the Persian rebel, Masmughan of Damavand, against whom Mahdi was first sent to Khurasan. Her mother was Bakand, the daughter of Isbahbadh, Farrukhan the Little. She had a sister named Smyr. She bore al-Mahdi a son named for his grandfather, Mansur, and two daughters, Sulaimah and Aliyah. Another was Shaklah, a Negress. Her father was Khwanadan, steward of Masmughan. She had a brother named Humayd. She was acquired by al-Mahdi together with al-Bahtariyah, when she was a child. He presented her to his concubine Muhayyat, who, discovering musical talent in the child, sent her to the famous school of Taif in the Hijaz for a thorough musical education. Years later al-Mahdi, then caliph, took her as his concubine. She gave birth to al-Mahdi's powerful and dark-skinned son Ibrahim.
Another concubine was Maknunah, a singer. She was owned by al-Marwaniyyah. Al-Mahdi, while yet a prince, bought her for 100,000 silver dirhams. She found such favor with the prince that al-Khayzuran used to say, "No other woman of his made my position so difficult." She gave birth to al-Mahdi's daughter Ulayya. Another was Basbas, a singer trained at Medina. He had bought her about the same period for 17,000 gold dinars. Another was Hasanah, a Persian. She was a singer, and was al-Mahdi's favourite concubine. She gave al-Khayzuran some uneasy moments. According to some versions, she was unintentionally but tragically involved in al-Mahdi's death. Some other concubines were Hullah, another singer, and Malkah.
Al-Mahdi's second wife was Asma, al-Khayzuran's younger sister. She grew up at the court. In 775–776, al-Mahdi formed a sudden attachment for her. He then married her, settling on her a marriage portion of one million dirhams. Al-Khayzuran, who had been on the pilgrimage, learned of the marriage. After her return, al-Mahdi divorced Asma, and married al-Khayzuran as his third wife. That same year, he married his fourth wife Umm Abdallah, a noble Arab woman. The next year he married his fifth wife Ruqaiyah, an Uthmanid. After al-Mahdi's death, she married an Alid.

## Wars with Byzantium

In 778, the Byzantines, under Michael Lachanodrakon, seized the town of Germanikeia (Ma'rash), where they captured significant amounts of booty and took many Syrian Christians captive, and defeated an army sent against them by the Abbasid general Thumama ibn al-Walid. In the next year, the Byzantines took and razed the fortress city of Hadath, forcing Caliph al-Mahdi (r. 775–785) to replace the rather passive Thumama with the veteran al-Hasan ibn Qahtaba. Hasan led over 30,000 troops in an invasion of Byzantine territory, but the Byzantines offered no opposition and withdrew to well-fortified towns and refuges, until a lack of supplies forced Hasan to return home without achieving much.
In response to these Byzantine successes, Caliph al-Mahdi now resolved to take the field in person. On 12 March 780, Mahdi departed Baghdad and via Aleppo marched to Hadath, which he refortified. He then advanced to Arabissus, where he left the army and returned to Baghdad. His son and heir Harun—better known by his laqab, or regnal name, al-Rashid—was left in charge of one half of the army, which raided the Armeniac Theme and took the small fort of Semaluos. Thumama, who had been entrusted with the other half, penetrated deeper into Asia Minor. He marched west as far as the Thracesian Theme, but was heavily defeated there by Lachanodrakon. In June 781, as the Arab invasion force assembled at Hadath under Abd al-Kabir, a great-great-nephew of the Caliph Umar (r. 634–644), and again prepared to launch their annual raid, Empress Irene called up the thematic armies of Asia Minor and placed them under the eunuch sakellarios John. The Muslims crossed into Byzantine Cappadocia over the Pass of Hadath, and were met near Caesarea by the combined Byzantine forces under Lachanodrakon. The ensuing battle resulted in a costly Arab defeat, forcing Abd al-Kabir to abandon his campaign and retreat to Syria.
This defeat infuriated the Caliph al-Mahdi, who prepared a new expedition. Intended as a show of force and a clear display of the Caliphate's superiority, it was the largest army sent against Byzantium in the second half of the 8th century: it allegedly comprised 95,793 men, about twice the total Byzantine military establishment present in Asia Minor, and cost the Abbasid state some 1.6 million nomismata, almost as much as the Byzantine Empire's entire annual income. His son, Harun was the nominal leader, but the Caliph took care to send experienced officers to accompany him.

### Caliph's Invasion of Byzantine in 782

On 9 February 782, His son, Harun departed Baghdad; the Arabs crossed the Taurus Mountains by the Cilician Gates, and swiftly took the border fortress of Magida. They then advanced along the military roads across the plateau into Phrygia. There, Harun left his lieutenant, the hadjib al-Rabi' ibn Yunus, to besiege Nakoleia and guard his rear, while another force, reportedly 30,000 men, under al-Barmaki (an unspecified member of the powerful Barmakid family, probably Yahya ibn Khalid), was sent to raid the rich western coastlands of Asia Minor. Harun himself, with the main army, advanced to the Opsician Theme. The accounts of subsequent events in the primary sources (Theophanes the Confessor, Michael the Syrian, and al-Tabari) differ on the details, but the general course of the campaign can be reconstructed.
According to Warren Treadgold, the Byzantine effort seems to have been led by Irene's chief minister, the eunuch Staurakios, whose strategy was to avoid an immediate confrontation with Harun's huge army, but wait until it had split up and advanced to meet its various detachments independently. The Thracesians under Lachanodrakon confronted al-Barmaki at a place called Darenos, but were defeated and suffered heavy losses (15,000 men according to Theophanes, 10,000 according to Michael the Syrian). The outcome of al-Rabi's siege of Nakoleia is unclear, but he was probably defeated; Theophanes's phrasing may imply that the town was taken, but Michael the Syrian reports that the Arabs suffered great losses and failed to capture it, a version of events confirmed by hagiographic sources. Al-Tabari reports that part of the main army under Yazid ibn Mazyad al-Shaybani met a Byzantine force led by a certain Niketas who was "count of counts" (perhaps the Count of the Opsician Theme), probably somewhere near Nicaea. In the ensuing battle, Niketas was wounded and unhorsed in single combat with the Arab general and forced to retire, probably to Nicomedia, where the imperial tagmata (professional guard regiments) under the Domestic of the Schools Anthony were assembled. Harun did not bother with them, and advanced to the town of Chrysopolis, across the Bosporus Strait from Constantinople itself. Lacking ships to cross the Bosporus, and with no intention of assaulting Constantinople in the first place, Harun probably intended this advance only as a show of force.
Furthermore, despite his success so far, Harun's position was precarious, as the defeat of al-Rabi threatened his lines of communication with the Caliphate. Consequently, after plundering the Byzantine capital's Asian suburbs, Harun turned his army back, but during his march along the valley of the Sangarius River, east of Nicaea, he was surrounded by the forces of the tagmata under Anthony in his rear and of the Bucellarians under their general Tatzates to his front. Fortunately for him, at this point Tatzates, an Armenian prince who had defected from his Arab-ruled homeland to the Byzantines in 760 and was closely associated with the iconoclast regime of Constantine V, secretly made contact with him. Tatzates offered to aid Harun in exchange for a pardon and a safe return for himself and his family to his native Armenia. Theophanes explains Tatzates's actions with his hostility towards Irene's favourite, Staurakios, but this evidently masks a broader dissatisfaction with Irene's regime. As the German Byzantinist Ralph-Johannes Lilie writes, "Tatzates did not see any big opportunities for himself under the new regime and indeed used the good chance that the situation offered him".
Thus, when Harun asked for negotiations, Irene dispatched a delegation of three of her most senior officials: the Domestic Anthony, the magistros Peter, and Staurakios himself. Confident of their military position, they neglected to secure promises for their safety or hostages of their own, so that when they arrived in the Arab camp, they were made prisoners. Coupled with the treachery of Tatzates and the unreliability of the troops under his command, Irene was now forced to negotiate for their release, especially of her trusted aide Staurakios.
The two states concluded a three-year truce in exchange for a heavy annual tribute—the Arab sources mention various amounts between 70,000 and 100,000 gold nomismata, while one also adds 10,000 pieces of silk. Tabari's account records that the tribute amounted to "ninety or seventy thousand dinars", to be paid "at the beginning of April and in June every year". In addition, the Byzantines were obliged to provide provisions and guides for Harun's army on its march home, and to hand over Tatzates's wife and property. Harun released all his captives (5,643 according to Tabari), but kept the rich plunder he had gathered, and returned to the Caliphate in September 782. Tabari, in his account of the expedition, says that Harun's forces captured 194,450 dinars in gold and 21,414,800 dirhams in silver, killed 54,000 Byzantines in battle and 2,090 in captivity and took over 20,000 riding animals captive while slaughtering 100,000 cattle and sheep. Tabari also reports that the amount of plunder was such that "a work horse was sold for a dirham and a mule for less than ten dirhams, a coat of mail for less than a dirham, and twenty swords for a dirham"—at a time when one to two dirhams was the usual daily salary of a labourer or soldier.

## Assessment and legacy
### Cultural and administrative aspects of his reign

The cosmopolitan city of Baghdad blossomed during al-Mahdi's reign. The city attracted immigrants from Arabia, Iraq, Syria, Persia, and lands as far away as Afghanistan and Spain. Baghdad was home to Christians, Jews 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, who were of Persian extraction, had originally been Buddhists. Their short-lived Islamic legacy would count against them during the reign of Harun al-Rashid.
The introduction of paper from China (see Battle of Talas) in 751 had a profound effect. Paper had not yet been used in the West with the Arabs and Persians using papyrus and the Europeans using vellum. The paper-related industry boomed in Baghdad where an entire street in the city center became devoted to the sale of paper and books. The cheapness and durability of paper was a vital element in 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 focused on 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 to protect the umma against heresy. Al-Mahdi made great use of this broad, new power, and it would become important during the 'mihna' crisis of al-Ma'mun's reign.
Though Mahdi fulfilled most of his national and external goals during his reign, he was not as thrifty as his predecessor and father, al-Mansur had been. Al-Mahdi was very interested in consulting with his wife, al-Khaizuran in the all important daily affairs of the government. Her commands and prohibitions in the palace were equal to her husband's and many times she applied them outside the palace as well. Al-Mahdi did not oppose her, and he gave her a relatively free hand from the Bayt al-mal (treasury). Finally, al-Khayzuran held her own court in the harem and in her quarters where she met petitioners, both men and women, who asked her for favors or to intercede on their behalf with her husband, the caliph. These petitioners included court officials, military officers, nobles, and merchants:
    "She was dominant during Mahdi's time, people used to come and go through her door.. . She gave ordaining and forbidding, interceded and hindered, rejections and confirmations at her own will."
Al-Mahdi vacationed for long periods of time at al-Rusafa, officially, allowed his wife, Khaizuran to run certain matters pertaining to the state, and in general, liked to have a good time. Usually he went on such trips a lot or was away from the capital during the campaign, so he allowed her to act on his behalf and officials and officers took their orders from her. Former caliphs who embarked on the hajj pilgrimage to Mecca had made the long voyage with canteens full of muddy water and satchels of dates. Mahdi saw no reason for such extreme self-restraints, instead, he traveled like royalty, and even brought ice lugged all the way from the mountains of northern Persia so that his drinks could be cold.

### Famous anecdote about al-Mahdi

One day, al-Mahdi was out hunting deer. Shortly after embarking, Mahdi and his aide became separated from the rest of his entourage. Soon the two became exhausted and hungry and luckily found a tent belonging to a poor Bedouin and asked him if he had anything to eat. The man said yes and provided the two with bread, butter, and oil. Mahdi asked for wine, and the Bedouin gave him some. Mahdi asked the Bedouin if he knew who he was and the Bedouin, uninterested, said no he did not. Few people who did not live on the royal grounds would have known the caliph by sight. Mahdi told the Bedouin that he was a servant of the caliph. The Bedouin, impressed, said that is a good job. After another cup of wine, Mahdi asked again if the Bedouin knew who he was. The man replied that Mahdi already told him. Mahdi said no, I was lying, I am one of the top generals in the caliph's army. After another cup of wine, the caliph pronounced that in reality, he was in fact the caliph himself! The Bedouin refused to serve Mahdi any more wine and exclaimed if he did so, next Mahdi would proclaim himself the messenger of God!

### Coinage of al-Mahdi

Al-Mahdi used several styles of coinage but the traditional Islamic style of Gold dinar, silver dirham and Copper fals were common.
* Dirham of al-Mahdi, Medinat al-Salam (Baghdad) mint. Dated AH 162 (AD 778/9)
* Dirham of al-Mahdi minted in Bukhara
* Dirham of al-Mahdi minted in Tabaristan, (the Abbasid newly conquered territory).
* Bukharan coinage, under Al-Mahdi.

## Succession

His elder son was Al-Hadi, the older brother of Harun al-Rashid. Al-Hadi was very dear to his father, al-Mahdi and was appointed as the first heir by his father at the age of 16 and was chosen as the leader of the army.
His second, Harun's raids against the Byzantines elevated his political image and once he returned, he was given the laqab "al-Rashid", meaning "the Rightly-Guided One". He was promoted to Caliph's heir and given the responsibility of governing the empire's western territories, from Syria to Azerbaijan. Al-Hadi was nominated his first heir and Harun al-Rashid was named second. After al-Mahdi's death he was succeeded by Al-Hadi. He ruled for a year and two months. Al-Hadi was succeeded by his brother Harun as per the succession plan of al-Mahdi.