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 lasted 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 bad ideas. First, in an effort to undercut the powerful Iranian faction within the caliphal army, he took steps to increase the presence and authority of Turkish slave soldiers who had been brought from Central Asia and whose personal loyalty to the caliph (they were his personal slaves, after all) was supposed to be unquestioned. You can probably see where this is going. The Turkish 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 caliphal society, ties that might work against any tendency to amass power for itself.
Al-Muʿtasim’s second fateful decision was dictated by the first. The new Turkish 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 ethno-linguistic divide between the new military bosses and everybody else in the (predominantly Arab and Iranian) empire was already causing problems. So al-Muʿtasim decided to move his military capital to a new city, Samarra, which he ordered constructed just north of Baghdad. And, 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 the Turkish 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, his 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 Turkish 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 Turkish factions within the army. This period finally ended with the accession of al-Muʿtamid (d. 892), who was backed by a Turkish 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 the decisions and was the real royal authority.
While all this stuff was going on at the imperial center, governors and other officials outside that core started to a) really 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. 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 rule of Egypt. Slaves, many/most of them East African (these were called zanj, from which we get the word Zanzibar), who had been brought in to work the fertile Sawad region (the marshy alluvial area of southern Iraq), rebelled in 869. 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 powers often did. Yaʿqub joined, then rose to lead, an armed movement opposed to the Abbasids (I hesitate to call it a “rebellion” because that implies that they had at one time accepted Abbasid rule) that began in the eastern Iranian region known as Sistan (a historical region that 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 you have to rely 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–it’s pretty much impossible to know which).
Yaʿqub took several years consolidating his control in Sistan, but once his army got on the move, his domains 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 Khurasan and close advisers/viziers of the caliphs. The conquest of the southern Iranian province of Fars in 875 was their high water mark, but at the time Yaʿqub had designs on pushing further west and confronting the caliph directly.
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, 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” but carried a more military connotation in the 9th century) in Baghdad. Yaʿqub appears to have seen that this offer was made from a position of weakness, so he 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 (this process was already starting by the 13th century). The battle turned on two key points: the Abbasid forces outnumbered the Saffarids (the latter were about 10,000 men strong), 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. At that point, Yaʿqub’s army began to break and run.
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 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 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 the Ghaznavids.