Today in Middle Eastern history: the Battle of Dayr al-ʿAqul (876)

If you’re interested in history and foreign affairs, Foreign Exchanges is the newsletter for you! Sign up for free today for regular updates on international news and US foreign policy, delivered straight to your email inbox, or subscribe and unlock the full FX experience:

The Saffarid Dynasty ruled much of modern Iran and Afghanistan, and part of modern Pakistan, starting in the mid-860s through roughly 901, and then continued to control a small principality in Sistan until the start of the 11th century. They’re not heavily emphasized in Middle Eastern or Iranian history because they were so ephemeral (their peak as a dynasty ran a little over three decades and didn’t really last beyond the death of their founder), but they warrant mention as one of the first truly local dynasties to directly challenge the power of the Abbasid caliphs. Sure, the challenge didn’t go so well for them, but at least they gave it the old college try.

Before we talk more about the Saffarids, it’s worth taking a look at the state of the Abbasid Caliphate in the mid to late-9th century, which…wasn’t good. The younger brother and successor of the caliph al-Maʾmun, named al-Muʿtasim (d. 842), made two decisions that, while understandable in context, turned out to be pretty damaging to the dynasty. First, in an effort to undercut the powerful Iranian faction within his caliphal army, he took steps to increase the number and authority of Turkic slave soldiers who had been brought from Central Asia and whose personal loyalty to the caliph (they were his slaves, after all) was supposed to be unquestioned. You can probably see where this is going. The slave soldiers replaced the Iranians as the dominant power bloc within the military, only unlike the Iranians (and the Arabs before that), this warrior class didn’t have any ethnic or linguistic ties to the rest of the empire, ties that might have softened their more militant tendencies.

Al-Muʿtasim’s second fateful decision was dictated by the first. The new mostly Turkic military (which could almost be called a ruling caste except that they still served—at least nominally—under the caliph) was based in Baghdad, but had a very hard time getting along with the imperial old guard and the population of the city. That ethnic/linguistic divide between the new military bosses and everybody else in the empire began causing problems fairly early on. So al-Muʿtasim decided to move his military capital to a new city, Samarra, which he had constructed just north of Baghdad. For security reasons he moved the caliphal court there as well. Samarra became the Abbasids’ Versailles, a new royal court separated from the ossified official life in Baghdad. Al-Muʿtasim was able to create a new court that favored people loyal to him via the sale/granting of land in and around the new city, and the tensions caused by having that Turkic army in Baghdad were alleviated.

However, the decision to relocate the capital also made the caliph a hostage (or hostage-in-waiting) to his new military elite, though I assume al-Muʿtasim didn’t see it at the time. Isolated from the people of Baghdad and most of the old bureaucracy, the Abbasid rulers were now entirely surrounded by the guys who had all the weapons. In theory, the caliph’s stature as caliph and as their owner (remember that these were slave soldiers) should have protected his authority. In practice, I mean, come on. It didn’t happen overnight, but the assassination, by his Turkic guard, of the Caliph al-Mutawakkil in 861 made it clear who was really in charge in Samarra. The rest of that decade marks a period that some historians refer to as the “Anarchy at Samarra,” as three more caliphs were enthroned and then dethroned (and killed) by various factions within the army. This period finally ended with the accession of al-Muʿtamid (d. 892) in 870, who was backed by a Turkic faction that remained powerful enough to fend off any other contenders. However, al-Muʿtamid really ruled in name only—it was the caliph’s brother, al-Muwaffaq (d. 891), who made most of the decisions.

While all this stuff was going on at the imperial center, governors and other officials outside that core started to a) resent these unruly Turks who suddenly seemed to be running the empire, and b) think that maybe this was a good time to get free of the caliph and establish their own local kingdoms. Baghdad, for example, resisted Samarra’s authority, sparking a short mini-civil war in the caliphate. A Zaydi Shiʿa principality formed in Tabaristan, on the southern coast of the Caspian. The governor of Egypt, a Turk named Ahmad b. Tulun, tried to become the ruler of Egypt. Slaves who had been brought in to work the fertile Sawad region (the marshy alluvial area of southern Iraq), rebelled in 869. Many of these slaves were from East Africa, so this rebellion is known as the Zanj Rebellion, since the Arabic word for East Africans was zanj (this is also where we get the name “Zanzibar,” by the way). And then there were the Saffarids, in the east.

The Saffarid Dynasty was founded by an Iranian fellow named Yaʿqub b. al-Layth al-Saffar (d. 879) in 861. His epithet saffar means “coppersmith,” and it reflects Yaʿqub’s humble origins. He wasn’t some wayward Abbasid governor who decided to break out on his own, and he hadn’t pretended to accept nominal caliphal authority like other regional power players often did. Yaʿqub joined, then rose to lead, an armed movement opposed to the Abbasids that began in the eastern Iranian region known as Sistan (which comprises the southeastern-most part of modern Iran, southern Afghanistan, and southwestern Pakistan). Not much is known about these guys, as their movement started in an obscure peripheral part of the empire and none of them seem to have kept any written records. So we have to rely for information on later accounts from Abbasid sources, which unsurprisingly don’t offer the most evenhanded descriptions (they’re referred to as “Kharijites,” for example, and that could be true but it also could be meant as a pejorative—we just don’t know).

Yaʿqub took several years consolidating his control in Sistan, but once his army got on the move, his domain expanded relatively quickly. They took Kabul in 865 and conquered several Buddhist-ruled territories to the east, expanding the reach of Islam in the process, before turning their full attention westward. They annexed Khurasan in 873, helping to usher along the downfall of the Tahirid Dynasty, which had thrived for most of the 9th century as governors of that region and as close advisers/viziers of the caliphs. The conquest of the southern Iranian province of Fars in 875 was their high water mark, but Yaʿqub had designs on pushing further west and confronting the caliph directly, which ultimately turned out to be a bad idea.

Al-Muwaffaq’s overriding concern was that Yaʿqub’s army would make common cause with the ongoing Zanj rebellion, and that the combined force would simply be too much for the caliphal army to handle. Yaʿqub seems to have considered, then rejected, an offer from the Zanj rebels to do just that (it’s possible his decision was racially motivated though he may also have felt himself too refined to ally with slaves), but even so his army was clearly pretty formidable all on its own. So al-Muwaffaq tried to buy him off, offering him the governorship of virtually the entire eastern half of the empire along with the position of sahib al-shurtah (which is something like “chief of police” in literal translation but carried a more military connotation in the 9th century) in Baghdad, which would have installed him as chief “protector” over a weak caliph. Yaʿqub, correctly determining that al-Muwaffaq had made this offer from a position of weakness, rejected it and marched his army toward Samarra.

Dayr al-ʿAqul is just downriver from Baghdad and at the time was an important city on the Tigris River. It no longer exists, because the Tigris shifted its course and the area around the city was swallowed up by desert (we can’t exactly say when this process started but it was already under way by the 13th century). The battle turned on three key points: the Abbasid forces outnumbered the Saffarids (the latter were about 10,000 men strong), they knew the ground on which they were fighting, and many of Yaʿqub’s soldiers weren’t entirely sure that fighting the caliph’s army was a good idea. Still, the battle lasted most of the day with the outcome still in doubt, until a caliphal detachment was able to get behind the Saffarids and attack their baggage train (an army that is familiar with the battlefield can do that kind of thing). At that point, Yaʿqub’s army began to break and run, and in the process it ran smack into a trap the Abbasids had laid for it, in the form of a flooded plain that hampered the retreat (again this suggests that the Abbasids’ familiarity with the terrain played a crucial role). Many Saffarid fighters drowned while attempting to flee.

The Battle of Dayr al-ʿAqul ensured that Yaʿqub and the Saffarids truly had reached their apogee, and that they no longer posed a threat to the caliphate. Still, the Saffarids kept their hands on most of their territory, including Fars, and this was now formally recognized by a decree of governorship from the nominal caliph, al-Muʿtamid. Yaʿqub died in 879 and was succeeded by his brother, ʿAmr b. al-Layth (d. 902), who spent most of his time trying to shore up Saffarid control over Khurasan in the face of opposition from local forces and from al-Muwaffaq, though he and the caliphal court did eventually come to form an uneasy working relationship with one another.

Al-Muʿtadid (d. 902), the son of al-Muwaffaq, who succeeded his uncle al-Muʿtamid as caliph, gave the Saffarids control of the city of Rey and appointed ʿAmr the governor of Transoxiana. In 900, however, as ʿAmr was trying to establish his control over the new province, his army was defeated by a new regional power, the Samanids (you can also see them on the map above). ʿAmr was captured and sent to Baghdad, where he was executed in 902, and the Samanids drove the Saffarids back into Sistan. They managed to remain in power there for another century (until 1003) before they were eradicated altogether by another up and coming dynasty, the Ghaznavids.