Al-Muwaffaq

Abu Ahmad Talha ibn Ja'far (أبو أحمد طلحة بن جعفر) (842 – June 2, 891), better known by his laqab as al-Muwaffaq bi-Allah (الموفق بالله, "Blessed of God" ), was an Abbasid prince and military leader, who acted as the virtual regent of the Abbasid Caliphate for most of the reign of his brother, Caliph al-Mu'tamid. His stabilization of the internal political scene after the decade-long "Anarchy at Samarra", his successful defence of Iraq against the Saffarids and the suppression of the Zanj Rebellion restored a measure of the Caliphate's former power and began a period of recovery, which culminated in the reign of al-Muwaffaq's own son, the Caliph al-Mu'tadid.

Early life
Talha, commonly known by the teknonymic Abu Ahmad, was the son of the Caliph Ja'far al-Mutawakkil (r. 847–861) and a slave concubine, Umm Ishaq. In 861, he was present in his father's murder at Samarra by the Turkish military: the historian al-Tabari reports that he had been drinking with his father that night, and came upon the assassins while going to the toilet, but after a brief attempt to protect the caliph, he retired to his own rooms when he realized that his efforts were futile. The murder was almost certainly instigated by al-Mutawakkil's son and heir, al-Muntasir, who immediately ascended the throne; Abu Ahmad's own role in the affair remains suspect, however, given his close ties later on with the Turkish military leaders. According to Hugh N. Kennedy, "it is possible, therefore, that Abu Ahmad had already had close links with the young Turks before the murder, or that they were forged on that night". This murder opened a period of internal upheaval known as the "Anarchy at Samarra", where the Turkish military chiefs vied with other powerful groups and with each other over control of the government and its resources.

It was during this period, in February 865, that Caliph al-Musta'in (r. 862–866) and two of the senior Turkish officers, Wasif and Bugha the Younger, fled Samarra to Baghdad, where they could count on the support of the Tahirids. The Turkish army in Samarra then selected al-Musta'in's brother al-Mu'tazz (r. 866–869) as Caliph, and Abu Ahmad was entrusted with the conduct of operations against al-Musta'in and his supporters. The ensuing siege of Baghdad lasted from February to December 865, after which a negotiated settlement was reached. Contrary to the agreed terms, al-Musta'in was murdered. It was most likely during this time that Abu Ahmad forged his close ties to the Turkish military, especially Musa ibn Bugha, who played a crucial role during the siege. Abu Ahmad further solidified these ties when he secured a pardon for Bugha the Younger, who had sided with al-Musta'in.

On his return to Samarra, Abu Ahmad was initially received with honour by the Caliph, but soon he was thrown into prison as a potential rival, along with another of his brothers, al-Mu'ayyad. The latter was soon executed, but Abu Ahmad survived thanks to the protection of the Turkish military. Eventually, he was released and exiled to Basra before being allowed to return to Baghdad. He was so popular there that at the time of al-Mu'tazz's death, there was popular agitation in the city in favour of his elevation to Caliph. Instead, al-Muhtadi (r. 869–870) was chosen.

Regent of the Caliphate
At the time al-Muhtadi was killed by the Turks in June 870, Abu Ahmad was at Mecca. Immediately he hastened north to Samarra, where he and his associate Musa ibn Bugha effectively sidelined the new Caliph, al-Mu'tamid (r. 870–892), and assumed control of the government. Within a short time, Abu Ahmad was conferred an extensive governorate covering most of the lands still under caliphal authority: western Arabia, southern Iraq with Baghdad, and Fars. To denote his authority, he assumed an honorific name in the style of the caliphs, al-Muwaffaq bi-Allah. His power was further expanded in 875, when the Caliph included him in the line of succession after his own son, Ja'far al-Mufawwad, and divided the empire in two large spheres of government. The western provinces were given to al-Mufawwad, while al-Muwaffaq was given charge of the eastern ones, but in practice, al-Muwaffaq continued to exercise control over the western provinces as well. Al-Mu'tamid was largely confined to Samarra, while al-Muwaffaq and his personal viziers (Sulayman ibn Wahb, Sa'id ibn Makhlad and Isma'il ibn Bulbul) ruled the Caliphate from Baghdad. What little autonomy al-Mu'tamid enjoyed was further curtailed after the death of the long-serving vizier Ubayd Allah ibn Yahya ibn Khaqan in 877, when al-Muwaffaq assumed the right to appoint the Caliph's viziers himself. Al-Muwaffaq's personal secretary Sa'id ibn Makhlad was the outstanding figure in the Caliphate's bureaucracy until his own disgrace in 885, followed after by Isma'il ibn Bulbul, who served concurrently as vizier to both brothers.

In his close association with the military, al-Muwaffaq differed from most Abbasid princes of his time, and in this his career echoes that of his grandfather, the Caliph al-Mu'tasim (r. 833–842). Like him, al-Muwaffaq's position relied to a great extent on his close ties with the Turkish military: following the demands of the Turkish rank and file for one of the Caliph's brothers to be appointed as their commander, bypassing their own leaders, who were accused of misappropriating salaries, he was appointed the main intermediary between the caliphal government and the Turkish military. In return for the Turks' loyalty he abolished the other competing corps of the caliphal army such as the Maghariba or the Faraghina, which are no longer mentioned after ca. 870. Hugh Kennedy sums up the arrangement thus: "al-Muwaffaq assured their status and their position as the army of the caliphate and al-Muwaffaq's role in the civil administration meant that they received their pay". Al-Muwaffaq's close personal relationship with the Turkish military leadership—initially Musa ibn Bugha, and Kayghalagh and Ishaq ibn Kundaj after Musa's death in 877—his own prestige as a prince of the dynasty, and the exhaustion after a decade of civil strife allowed him to establish unchallenged control over the Turks, as indicated by their willingness to participate in costly campaigns under his leadership.

Campaigns
As the main military leader of the Caliphate, it fell upon al-Muwaffaq to meet the numerous challenges to caliphal authority that sprung up during these years, and indeed, as Michael Bonner writes, "al-Muwaffaq's decisive leadership was to save the Abbasid caliphate from destruction on more than one occasion". The main military threats to the Abbasid Caliphate were the Zanj Rebellion in southern Iraq and the ambitions of Ya'qub ibn al-Layth, the founder of the Saffarid dynasty, in the east.

A humble soldier, Ya'qub, surnamed al-Saffar ("the Coppersmith"), had exploited the decade-long Samarra strife to first gain control over his native Sistan, and by 873 he had gained control over almost all of the eastern lands of the Caliphate, ousting the hitherto dominant Tahirids from power, a move denounced by al-Muwaffaq. Finally, in 875 he seized control of the province of Fars, which not only provided much of the scarce revenue for the Caliphate's coffers, but was also dangerously close to Iraq. The Abbasids tried to prevent an attack by Ya'qub by formally recognizing him as governor over all the eastern provinces and special honours including adding his name to the Friday prayer and the influential position of sahib al-shurta (chief of police) in Baghdad. Nevertheless, in the next year Ya'qub began his advance on Baghdad, until Ya'qub was confronted and decisively beaten by the Abbasids under al-Muwaffaq and Musa ibn Bugha at the Battle of Dayr al-'Aqul near Baghdad. The victory, a surprise to many, saved the capital and allowed for the recovery of Ahwaz, but despite Ya'qub's death from illness in 879 the Saffarids remained firmly ensconced in their possession of most of Iran.

The struggle against the uprising of the Zanj slaves in the marshlands of southern Iraq—according to Michael Bonner "the greatest slave rebellion in the history of Islam"—which began in September 869, was longer and more difficult, and almost brought the Caliphate to is knees. Due to the Saffarid threat, the Abbasids could not mobilize against the Zanj until 879. Consequently, the Zanj initially held the upper hand, capturing much of lower Iraq including Basra and Wasit and defeating the Abbasid armies, which were reduced to trying to contain the Zanj advance. The balance tipped in 879, when al-Muwaffaq's son Abu'l-Abbas, the future Caliph al-Mu'tadid (r. 892–902), was given the command, joined in 880 by al-Muwaffaq himself. In a succession of engagements in the marshes of southern Iraq, the Abbasid forces drove back the Zanj towards their capital, Mukhtara, which fell in August 883.

During this time, Al-Muwaffaq also had to confront the challenge posed by the ambitious governor of Egypt, Ahmad ibn Tulun. Exploiting the rift between the increasingly powerless Caliph and his brother with demonstrations of support for the former, and relying on a powerful army built up from Egypt's riches, Ibn Tulun managed to gain control over Syria and the frontier zone with the Byzantine Empire (the Thughur). Al-Muwaffaq tried to counter Ibn Tulun's advances by naming the trusted Musa ibn Bugha as governor of Egypt, but lack of funds foiled his plans, allowing Ibn Tulun to consolidate his power in the west. In 882, al-Mu'tamid tried to escape from Samarra to seek sanctuary from Ibn Tulun, but was apprehended and he was placed under effective house arrest. This event opened the rift between Ibn Tulun and al-Muwaffaq even further, with Ibn Tulun trying to declare jihad against the regent and the latter having curses against the Tulunid read from the mosques across the Caliphate. After Ibn Tulun's death in 884, al-Muwaffaq attempted again to retake control of Egypt from Ibn Tulun's successor Khumarawayh. Khumarawayh, however defeated an expedition under Abu'l-Abbas, and extended his control over most of the Jazira and Cilicia as well. In 886, al-Muwaffaq was forced to recognize the Tulunids as governors over Egypt and Syria for 30 years, in exchange for an annual tribute of 300,000 gold dinars.

With the Zanj subdued, after 883 al-Muwaffaq turned his attention again to the east. Ya'qub al-Saffar's brother and successor, Amr ibn al-Layth, had acknowledged the Caliph's suzerainty and been rewarded with the governorship over the eastern provinces and the position of sahib al-shurta of Baghdad—essentially the same posts the Tahirids had held—in exchange for an annual tribute, but soon he was having trouble asserting his authority, especially in Khurasan, where Rafi ibn Harthama emerged as the leader of the former Tahirid troops. In 884/885, Amr was formally deprived of his governorship of Khurasan in favour of the Dulafid Ahmad ibn Abd al-Aziz, and the army under the vizier Sa'id ibn Makhlad conquered most of the province of Fars, forcing Amr himself to come to Fars. After initial success against the general Tark ibn al-Abbas, Amr was routed by Ahmad ibn Abd al-Aziz in 886, and again in 887 by al-Muwaffaq in person. Nevertheless, the threat by the Tulunids and the Byzantines in the west forced al-Muwaffaq to negotiate a settlement in 888/889 that largely restored the previous status quo. In 890, al-Muwaffaq again attempted to take back Fars, but this time Ahmad ibn Abd al-Aziz was defeated, and another agreement restored peace and Amr's titles.

During this period, al-Muwaffaq's relations with his son Abu'l-Abbas deteriorated, although the reason is unclear. In 889, Abu'l-Abbas was arrested and imprisoned on his father's orders, where he remained despite the demonstrations of the ghilman loyal to him. He apparently remained under arrest until May 891, when al-Muwaffaq, already nearing his death, returned to Baghdad after two years he spent in Jibal. Abu'l-Abbas was then released from captivity by his father's and his own troops, despite the attempt of the city commander, Abu'l-Saqr, who hoped to secure his position by ridding al-Mu'tamid and al-Mufawwad of a dangerous rival, to prevent it. Al-Muwaffaq died on 2 June, and was buried in al-Rusafah near his mother's tomb. On the very next day, Abu'l-Abbas succeeded his father in his offices. In October 892, al-Mu'tamid died and Abu'l-Abbas al-Mu'tadid brushed aside his cousin to ascend the throne, quickly emerging as "the most powerful and effective Caliph since al-Mutawakkil" (Kennedy).