Today in Middle Eastern history: the Battle of Hama (903)

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:


Stop me if you’ve heard this one before: a fairly small, radical—apocalyptic, really—and highly militarized Islamic sect carves out a chunk of territory, including a sizable piece of Syria, in which to establish its own very wealthy political entity that could be described as revisionist, expansionist, and even irredentist. They specialize in hit-and-run attacks on their neighbors that maximize civilian casualties, attacks that would certainly meet most definitions of the term “terrorism.” Their targets are intended to shock ordinary people and to support their esoteric interpretation of Islam—to that end, they deliberately seek to damage and destroy physical symbols of cultural and religious significance. The people unfortunate enough to find themselves captured by or otherwise living under the rule of these fanatics often find themselves enslaved. Recognized by almost none of its neighbors and opposed by nearly all of them, the emirate ruled by these fanatics nevertheless survives far longer than it probably should, and the fanatics themselves deal out considerable pain and suffering to those neighbors along the way.

I’m talking, of course, about the Qarmatians (or Qarmathians if you prefer; in Arabic they’re the Qaramitah), the Ismaʿili Shiʿa movement that ruled a big chunk of the Arabian peninsula, centered in Bahrayn (which historically refers to eastern Arabia, not just the modern island nation of Bahrain), from the tail end of the 9th century through the middle of the 11th century. It’s a good thing we don’t have to deal with anything like that nowadays, am I right?

The Qarmatians c. 1000; the Battle of Hama took place about a century earlier than this, so for our purposes you’ll need to imagine that the “Buyid” area is divided between the Abbasids and the Saffarids, and that the Egyptian and Syrian parts of the “Fatimid Caliphate” belong instead to the Tulunids

I don’t want to go too far down the trail here, but you need to know a little bit about the Qarmatians before we get to today’s topic, the Battle of Hama in 903. If you know early Shiʿa history, and you should, then you know that the Ismaʿilis were the branch of Shiʿa who believed that Imam Jaʿfar al-Sadiq (d. 765) had designated his eldest son, Ismaʿil (d. 762), as his heir. They held that this designation was binding even though Ismaʿil unfortunately (parents burying their children and all) died before his father did. They believed either that Ismaʿil was the final imam or that his designation passed to his oldest son, Muhammad, who died in 813. Or did he? Most (though not all, as we’ll see) of Ismaʿil’s followers believed that Muhammad did not die but was in fact “occulted,” or placed in a kind of divine suspended animation, whence he would return at the End of Days as the promised Mahdi. This is more or less what “Twelver” or Imami Shiʿism (the largest Shiʿa branch nowadays and the one prevalent in Iran) teaches about its 12th and final imam, Muhammad al-Mahdi, who—assuming he was a real person; we can’t be entirely sure—disappeared in 874 at the age of five.

These “Ismaʿilis” gained a number of followers in places like Kufa, Iraq; Salamiyah, Syria; and Bahrayn, owing to their very enthusiastic proselytizing effort, known as the daʿwah (literally “invitation,” but basically missionary work). Sometime in the 870s, they converted a man named Hamdan Qarmat, who rose to become one of the leaders of the community at Kufa and was able to spread the Ismaʿili message into southern Iran and even as far east as Central Asia. The Ismaʿili movement fragmented several times, but the split that concerns us took place in 899, when a group of Ismaʿili leaders at Salamiyah declared that, hey, as it turns out, Muhammad ibn Ismaʿil did actually die in 813, and he was not actually the Mahdi, and wouldn’t you know there have been a series of imams living on the down-low (due to threats from the authorities) ever since, starting with Muhammad’s son Ahmad al-Wafi.

Hamdan Qarmat immediately broke with the Salamiyah leadership over this issue, but he had a sudden…oh, let’s say “change of heart,” after the Salamiyah group murdered his brother in-law. He became one of the chief missionaries on behalf of Abdullah al-Mahdi Billah, Muhammad ibn Ismaʿil’s great-great grandson (or so he claimed, anyway), who was now calling himself the current, very much living, imam. Al-Mahdi would eventually found the Fatimid Caliphate, but that’s not our focus here.

Most of Hamdan’s followers didn’t share his new insight (presumably all of their in-laws were as yet un-murdered), and they continued to be called Qarmatians even though they’d lost their namesake. This 899 schism is treated as the “founding” moment for the Qarmatians, even though there’s broad continuity between the post-899 Qarmatians and the pre-schismatic Ismaʿili community, so if anything it was the Fatimids who were the splitters. The Qarmatians based their community in Bahrayn and had a pretty long run there, as I wrote above. There are lots of interesting Qarmatian stories we could cover, like the time they sacked Mecca in 930 and stole the Black Stone from the Kaaba, but, like the rise of the Fatimids, that’s also not today’s topic. Because the Qarmatians were around for so long, we know that their defeat (SPOILER) in the battle we’re talking about today, the 903 Battle of Hama, obviously wasn’t fatal to their political project. Hama’s outcome was instead important because it brought part of the Abbasid Caliphate back under Abbasid control. To understand that dynamic, we need to make one more short digression, sorry.

The Abbasid Caliphate started to come apart a bit over the course of the 9th century, as various local dynasties arose to govern different parts of their empire. The Samanid Dynasty came to power in Central Asia, for example, and the Saffarids in eastern (and later central) Iran. In theory, each of these regional powers was invested by the Abbasid caliph in Baghdad to govern their territory on his behalf, and in return they paid nominal allegiance to the caliph as their overlord. On paper (figuratively) they were vassals, governors with an inherited title. But the truth was that by investing these dynasties, the militarily weak Abbasids were simply recognizing reality—these dynasties would have ruled the territories under their control whether the Abbasids formalized it or not. Acknowledging them as autonomous local rulers/governors, and thereby maintaining the fiction of the caliph as their overlord, was better than having them break away from the caliphate altogether.

One of these local ruling families was the Tulunid Dynasty, which ruled Egypt and most of Syria from 868 to 905 as an almost independent entity. This short-lived dynasty was founded by a Turkic military commander named Ahmad ibn Tulun (d. 884), who was appointed governor of Egypt by Caliph al-Muʿtazz in 868. By the mid-870s Ahmad had (figuratively) told the Abbasids to get bent and was ruling Egypt on his own, and by 880 he’d added most of Syria to his possessions. Ibn Tulun’s son, Khumarawayh (d. 896), extended the dynasty’s territory into northern Iraq, and eventually forced the Abbasids to recognize Tulunid control over the territories in his possession, in exchange for one of those pro forma agreements that the Tulunids were ruling on behalf of the Abbasids.

The Qarmatians’ first priority seems to have been regaining the foothold in Syria that they lost in their schism with the Fatimids. But getting from Bahrayn into Syria, and then staying there, meant encountering, and therefore defeating, the Tulunids. At this the Qarmatians were successful, establishing a foothold at Palmyra and ultimately forcing Abdullah al-Mahdi Billah to hightail it to North Africa, where, to reiterate, he would found his Fatimid Caliphate in 909. From Palmyra, the Qarmatians repeatedly raided Tulunid territory—Hama, Homs, and coastal areas in modern-day Lebanon, for example—and the Tulunids seemed completely unable to do anything to stop them. It occurred to the new (as of 902) Abbasid Caliph, al-Muktafi (d. 908) that perhaps this sign of Tulunid weakness offered an opening for the Abbasids to deal a blow not only to the Qarmatians, but also to the Tulunids. In a major break with caliphal tradition, al-Muktafi led his army personally…but only as far as Raqqa, where he turned command over to his senior general, Muhammad ibn Sulayman.

The Qarmatian and Abbasid armies met a short distance outside of Hama on November 29, and there doesn’t seem to have been a whole lot to the subsequent battle. I can’t even give you numbers on the size of the armies, although I think it’s fair to say that the Abbasids had numerical superiority, both because this was a caliphal army facing a relatively small religious movement and because if the Abbasids had been outnumbered, you can bet the later sources would have made a big deal out of that fact and they don’t, as far as I know. The Qarmatian flanks attacked the Abbasid flanks and were driven off, allowing the caliphal army to surround the remaining Qarmatian forces, which eventually broke and fled. Many top Qarmatian commanders were killed, and several others were taken prisoner—they were sent to Baghdad and later executed.

As I noted above, Hama was at best a minor setback for the Qarmatians, whose high times were yet to come, but the Abbasid success here led directly to the collapse of the Tulunids. Already so weak that they hadn’t been able to run the Qarmatians off themselves, and then further weakened by that series of Qarmatian raids on their Syrian territory, the Tulunids put up virtually no resistance in 904, when Muhammad ibn Sulayman once again led a caliphal army into Syria. The Tulunid ruler, Khumarawayh’s son Harun, was promptly assassinated by a group of his uncles, many of whom went over to the Abbasid side. Whatever resistance the Tulunids could muster formed around one of Harun’s uncles, Shayban, but he surrendered the entire emirate back to Abbasid control in 905, without a fight.

The Abbasids finally had a measure of power back, having restored full control over two of the caliphate’s most important provinces. They were riding high…for all of 4 decades, before an Iranian dynasty called the Buyids captured Baghdad and turned the caliphs into their puppets in 945. Egypt and Syria, meanwhile, would fall to the Fatimids in 969 and ~977, respectively. From that point on, barring rare and brief exceptions, Syria/Egypt, on the one hand, and Iraq, on the other, would always be ruled by different empires, until the Ottomans united them again in the middle of the 16th century.