Revolts: Iranian fightback and Turkish takeover
Al-Mutasim succeeds his brother (833)
Al-Mamun was the last caliph to take on the Byzantine empire: he invaded Anatolia three times - he died on the last expedition in AD 833. He was succeeded by his brother al-Mutasim. Mamun had had strong ties with Khorasan through his Iranian mother: Mutasim's mother was Turkish - and Khorasan was left to the Tahirids. Turks for the first time became integral to the army - through a system which persisted for many centuries: slaves were bought from outside the empire (from Transoxiana and Ferghana) as boys and trained as professional soldiers (known as ghulams or Mamluks). With them he led a revenge attack against the Byzantines (who had rashly invaded under emperor Theophilus and shown especial brutality ) and conducted an even more impressive massacre of his own. When Mutasim died the Abbasid empire seemed secure and extremely prosperous. But the side-lining of the Arab warriors who had created the empire - first with the non-Arab Khorasanis, and now with the Turks - was changing the whole culture. Arabs - used to the easy familiarity with their rulers in the desert, became increasingly alienated. At the same time, the caliphs became more remote and reliant on non-Arab Iranians and Turks to bolster their despotism. Within 20 years the whole structure began to disintegrate.
Azerbaijan: Babak's stronghold through the mist
A serious revolt had broken out in Azerbaijan led by Babak (or Papag - naming himself after the ancestor of the Sasanian dynasty - thus consciously evoking the Iranian past). It began in 816 against Mamun, and was not suppressed for 20 years. He led his rebels in the name of Khurramism - a more recent form of Mazdakism: and as a reformed version of Zoroastrianism, another way of asserting an anti-Arab, anti-Muslim identity. Supported by the official governor of Azerbaijan, he held off four armies sent by the caliphate. At last in 837, his mountain bastion was captured by Afshin, a fellow mountain man recruited by Mutasim from Transoxiana. Mutasim, though, fearing another powerful Iranian with a loyal army, had him too executed in 841.
Babak is a hero in modern Azerbaijan!
Another Iranian insurgency in the Caspian was put down only with the help of the Tahirids. Support for the Khurramist cause, however, continued to linger among Iranians throughout the empire. The now mainly Turkish army was also proving hard to handle. Mutasim abandoned Baghdad and moved his capital north to Samarra - to avoid fighting between Turks and Baghdadis, and to keep his Turkish elite away from luxurious distractions.
Al-Wathiq succeeds his father (841 - 7)
Wathiq's mother was a Greek concubine - but Turkish influence increased during his reign, which was marked by small-scale uprisings in several parts of the caliphate. All were suppressed with brutal efficiency. When he died without naming a successor, the Turks chose his brother al-Mutawakkil as caliph.
Al-Mutawakkil (847 - 861)
Mutawakkil tried, belatedly perhaps, to curb Turkish influence. He hoped by appointing his sons to governorships of parts of the empire (as Harun al-Rashid had done) to send a message to the Turkish generals not to cherish any ambitions in this direction. But the Turks stopped him moving his capital to Damascus (still completely Arab), and when he tried divide and rule (by confiscating one general's estates and giving them to another) it ended in disaster. Mutawakkil was murdered by a conspiracy of Turkish generals : and all future Abbasid caliphs would be Turkish appointments, as the Abbasids seemed doomed to irreversible degradation and eclipse.
Chaos and confusion (861 - 870)
A decade of anarchy and civil war ensued - in which caliphs in Samarra and Baghdad were supported or opposed by Turkish factions, themselves opposed or supported by the non-Turkish Khorasanian troops still stationed in Baghdad. Finally the one surviving Turkish general, Musa ibn Bugha, chose al-Mutamid, a surviving son of Mutawakkil, as caliph (three of his brothers had briefly held the office before being killed). The Turks still needed a caliph to affirm their legitimacy: it does not seem to have occurred to them to simply take over!
Rebellions became common - not helped by the situation in Samarra and Baghdad:
Azerbaijan (again) - once more three armies were needed before Muhammad ibn al-Baith was defeated in 849.
Caspian provinces. Badly governed by the Tahirids of Khorasan, a Zaidi-led revolt led to the permanent loss of this territory for the Abbasids from 864.
Sistan. Revolt of the Saffarids: this was very serious. Led by Yaqub bin Laith as-Saffar, a coppersmith (saffar) turned warlord from Zaranj (now in eastern Afghanistan), they seized Sistan, ousted the Tahirids from Khorasan (873) and, by the time of Yaqub's death, had annexed the whole of Afghanistan, most of the Iranian plateau, most of Pakistan and the southern parts of Turkmenistan, Uzbekistan and Tajikistan. Al-Muwaffaq, brother of the caliph, with Turkish help, did manage to stop them taking Baghdad.
Iraq. Revolt of the Zanj (869 - 883) - the black slaves of southern Iraq/ Khuzistan. Almost everything about this revolt is controversial. Its leader styled himself Ali ibn Muhammad - and claimed to be a descendant of Ali ibn Talib, the prophet's nephew. He almost certainly wasn't - but his antecedents are unclear. Were the Zanj black slaves of East African origin? Or free black workers? Or slaves of varied origins? Or not slaves at all, but disgruntled Arab subjects of the Abbasids in Iraq? They were certainly difficult to defeat, waging a long and successful guerrilla campaign against Abbasid armies. Encouraged by the simultaneous Saffarid uprising further east, they conquered cities, won much territory, and killed thousands. In the end thanks to Muwaffaq, brother of the caliph and trusted administrator of the empire, the Abbasids dealt with them by a combination of effective military action and generous surrender terms (883). The Zanj revolt weakened the Abbasids in other areas - losing most of the east to the Saffarids, and also allowing Egypt to break free.
Under the next caliph, al-Mutadid (892 - 902), nephew of the previous caliph and son of Muwaffaq, there were signs of a modest recovery which continued under his son and successor al-Muktafi (902 - 907). Most of Iraq and large parts of Iran were recovered. But there was a price - Ahmad ibn Ismail the Samanid, the caliph's general, defeated the Saffarids in Khorasan and Transoxiana and the Zaidi occupiers of the Caspian provinces. But these areas came now under the control of the Samanids rather than the Abbasid caliph, though, like the Tahirids, they stayed basically loyal to the caliphate. The Samanids were Iranians, and Persian culture predominated at their capital in Bukhara.
Things deteriorated after Muktafi died, naming no successor. The palace bureaucracy, much strengthened under recent caliphs, took charge and chose his 13-year old son al-Muqtadir, who was consequently totally under the thumb of warring factions of officials. Nevertheless, during his reign Fars was reclaimed. But the recovery was illusory - the generals who did the work were too powerful to be fully controlled. Meanwhile another serious challenge to the Abbasids was developing: