Al-Muwaffaq
Abu Ahmad Talha ibn Ja'far, better known by his laqab as al-Muwaffaq bi-Allah, was an Abbasid prince and military leader, who acted as the de facto 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 teknonym Abu Ahmad, was the son of the Caliph Ja'far al-Mutawakkil and a slave concubine, Umm Ishaq. In 861, he was present in his father's murder at Samarra by the Turkish military slaves : 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; nevertheless Abu Ahmad's own role in the affair is suspect as well, 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 financial resources.It was during this period of turmoil, in February 865, that Caliph al-Musta'in 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 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, however, al-Musta'in was murdered. It was most likely during this time that Abu Ahmad consolidated his relationship with the Turkish military, especially with 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.
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 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 Musa ibn Bugha effectively sidelined the new Caliph, al-Mu'tamid, and assumed control of the government. Al-Muwaffaq differed from most Abbasid princes of his time through his close association with and participation in military affairs. In this his career echoes that of his grandfather, the Caliph al-Mu'tasim. Like him, al-Muwaffaq's power relied to a great extent on his close association 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. 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, as well as 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.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; in practice, al-Muwaffaq continued to exercise control over the western provinces as well. With al-Mu'tamid largely confined to Samarra, al-Muwaffaq and his personal secretaries 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.
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. 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. Al-Muwaffaq's drive and energy played a crucial role in their suppression.Saffarid invasion
A humble soldier, Ya'qub, surnamed al-Saffar, had exploited the decade-long Samarra strife to first gain control over his native Sistan, and then to expand his control. By 873 he ruled 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 by granting him special honours, including adding his name to the Friday prayer and appointment to the influential position of sahib al-shurta in Baghdad. Nevertheless, in the next year Ya'qub began his advance on Baghdad, until he 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 Abbasid victory, a complete 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.Zanj Revolt
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 after 879, when al-Muwaffaq's son Abu'l-Abbas, the future Caliph al-Mu'tadid, was given the command. Abu'l-Abbas was joined in 880 by al-Muwaffaq himself, and 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. Another son of al-Muwaffaq, Harun, also participated in the campaigns. He also served as nominal governor of a few provinces, but died young on 7 November 883. The victory over the Zanj was celebrated as a major triumph for al-Muwaffaq personally and for his regime: al-Muwaffaq received the victory title al-Nasir li-din Allah, "He who upholds the Faith of God", while his secretary Sa'id ibn Makhlad received the title Dhu'l-Wizaratayn, "Holder of the two vizierates".Relations with the Tulunids
At the same time, al-Muwaffaq also had to confront the challenge posed by the ambitious governor of Egypt, Ahmad ibn Tulun. The son of a Turkish slave, Ibn Tulun had been the province's governor since the reign of al-Mu'tazz, and expanded his power further in 871, when he expelled the caliphal fiscal agent and assumed direct control of Egypt's revenue, which he used to create an army of ghilman of his own. Exploiting the rift between the increasingly powerless Caliph and his brother with demonstrations of support for the former, and relying on his powerful army, Ibn Tulun managed to gain control over Syria and the frontier zone with the Byzantine Empire. By 882, he governed as a de facto independent ruler, adding his own name to the coins alongside the names of the Caliph and his heir.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 with Ibn Tulun, but was apprehended and placed under effective house arrest. This event opened the rift between Ibn Tulun and al-Muwaffaq even further. Ibn Tulun tried to declare jihad against the regent, and the latter had curses against the Tulunid read in the mosques across the Caliphate. From that moment, Egypt and Syria were effectively cut off from the rest of 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.