Al-Hasan al-A'sam

Abū ʿAlī al-Ḥasan al-Aʿsam ibn Aḥmad ibn al-Ḥasan ibn Bahrām al-Jannābī (أَبُو عَلِيّ ٱلحَسَن ٱلأَعْصَم بْنُ أَحْمَد بْنِ ٱلحَسَن بْنِ بَهْرَام الجَنَّابِيّ; al-Ahsa Oasis, 891 – Ramla, 977), was a Qarmatian leader, chiefly known as the military commander of the Qarmatian invasions of Syria (especially around Damascus and Palestine) in 968–977. Already in 968, he led attacks on the Ikhshidids, capturing Damascus and Ramla and extracting pledges of tribute. Following the Fatimid conquest of Egypt and the overthrow of the Ikhshidids, in 971–974 al-A'sam led attacks against the Fatimid Caliphate, who began to expand into Syria. The Qarmatians repeatedly evicted the Fatimids from Syria and invaded Egypt itself twice, in 971 and 974, before being defeated at the gates of Cairo and driven back. Al-A'sam continued fighting against the Fatimids, now alongside the Turkish general Alptakin, until his death in March 977. In the next year, the Fatimids managed to overcome the allies, and concluded a treaty with the Qarmatians that signalled the end of their invasions of Syria.

Family
Al-Hasan al-A'sam was born at al-Ahsa Oasis, the capital of the Qarmatians of Bahrayn, in 891, to Ahmad, son of the founder of the Qarmatian state, Abu Sa'id al-Hasan al-Jannabi. Power was held collectively among the sons of Abi Sa'id, although the youngest, Abu Tahir Sulayman al-Jannabi, was the dominant figure until his death in 944. After Abu Tahir's death, his brothers continued to hold power collectively until the 970s, when they began to die. At this point, their sons (al-A'sam and his cousins) were admitted into the ruling council. This means that, although al-A'sam was the principal military leader of the Qarmatians in their expeditions abroad, in reality power still resided with his uncles, the last of whom, Abu Ya'qub Yusuf, died in 977.

Attack on Ikhshidid Syria
Al-A'sam first appears as a commander of the Qarmatian forces that captured Damascus and defeated the Ikhshidid governor, al-Hasan ibn Ubayd Allah ibn Tughj in battle before his capital, Ramla, on 28 October 968. The town was plundered for two days, but the locals managed to buy off the Qarmatians with 125,000 gold dinars, whereupon they left the city. The Ikhsidid governor was obliged to agree to an annual tribute of 300,000 dinars to the Qarmatians to maintain control of Syria.

Medieval Arab historians (followed by the Orientalist historian Michael Jan de Goeje) consider these events to have been a co-ordinated, unified strategy as part of the Fatimid Caliphate's imminent conquest of Egypt. However, modern scholarship has revealed that the Qarmatians were neither loyal partisans of the Fatimids nor, as becomes evident from their behaviour once victorious, were they interested in conquest and conversion of the Syrian territories to their doctrine. Rather, the Qarmatians were principally interested in the extraction of tribute to sustain their resource-poor state. For this reason, the Qarmatians had for decades been raiding wealthier regions of the Islamic world. Indeed, al-A'sam apparently fell into disgrace after being accused of embezzling some of the booty amassed during this campaign. When the Qarmatian army again departed for Syria two months later, he was replaced by two of his cousins at the head of the expedition.

Campaigns against the Fatimids
The disgrace did not last long, as the conquest of Egypt by the Fatimid general Jawhar in 969 and the subsequent advance into Syria, which led to the defeat and capture of al-Hasan ibn Ubayd Allah ibn Tughj at the hands of the Fatimid general Ja'far ibn Fallah in April 970, changed the situation. The Fatimid takeover meant the end of the annual tribute promised by al-Hasan ibn Ubayd Allah ibn Tughj, and the Fatimids' declared intention to restore the safety of the Hajj routes threatened to put an end to the Qarmatians' extortion of the Hajj caravans as well.

This led to a radical shift of the Qarmatians—for which some sources consider al-A'sam to have been the principal instigator—against the Fatimids and a rapprochement with the Abbasids. Through the mediation of the Abbasid caliph al-Muti, the Qarmatians became the nucleus of a broad anti-Fatimid alliance, comprising not only the Qarmatians, but also the Hamdanid ruler of Mosul, Abu Taghlib, the Buyid ruler Izz al-Dawla, the Bedouin tribes of Banu Kilab and Banu Uqayl, and remnants of the Ikhshidid troops. The Qarmatian army moved to Kufa, Rahba, and Palmyra, gathering allies, arms and money at each stop along the way. As they approached Damascus, Ibn Fallah chose to confront the allies in open battle, but was defeated and killed.

Capture of Syria and first invasion of Egypt
On 25 August 971, the allies captured Damascus, with al-A'sam proclaiming the suzerainty of the Abbasid caliph over Syria and having the name of the Fatimid caliph, al-Mu'izz li-Din Allah, ritually cursed in the mosques. The Qarmatians now turned towards Ramla. Jawhar had sent reinforcements, freshly arrived from Ifriqiya, to the city, but their commander, Sa'adat ibn Hayyan, withdrew to Jaffa and adopted a passive stance. The Qarmatians were thus left free to sack Ramla on 5 September 971. Encouraged by his successes, al-A'sam proceeded to lay siege to Jaffa with part of their forces under Akhu Muslim—one of the most prominent members of the ashraf of Egypt and fervent opponent of the Fatimid regime—and led the remainder of his army into an invasion of Egypt. Egypt was left almost defenceless, while the Qarmatian army grew with the addition of the Banu Tayy Bedouin to it.

Al-A'sam entered Egypt at Qulzum, a month after capturing Damascus. Instead of moving directly against the Egyptian capital, Fustat, however, he moved north to the eastern Nile Delta. The coastal town of Tinnis, which had rebelled a year before against Fatimid taxation, rose up again in revolt, and the Qarmatians captured the town of Farama. A month later, a Fatimid army under Yaruq recovered Farama, but over the following weeks the revolt spread across the Delta, and Yaruq and his men had to retreat towards Fustat. The Qarmatians' detour nevertheless gave Jawhar time to prepare a ditch and wall, at Ayn Shams, north of Fustat, stretching for 10 km from the Nile to the Muqattam hills. The Fatimid general called almost the entire population of Fustat to arms, and in two fierce battles on 22 and 24 December 971, despite heavy losses, managed to defeat his opponents. The Qarmatians broke and retreated back into Palestine. Jawhar did not pursue them, but set a bounty on them, and many Qarmatians were killed as a result. Al-A'sam returned to al-Ahsa, but the Qarmatians remained in control of Syria.

Second invasion of Egypt
The Fatimids went onto the counteroffensive in 972, and managed to break the siege of Jaffa. Soon, the Qarmatian–Bedouin alliance disintegrated due to infighting, allowing the Fatimids to briefly seize again control of Palestine, before the Qarmatians returned later in the year. In 973, the Fatimid caliph al-Mu'izz moved his court to the new capital of Cairo in Egypt. From there the Caliph sent al-A'sam a letter, which has survived verbatim as it was included in the material collected by the contemporary anti-Fatimid polemicist Akhu Muhsin. In it, al-Mu'izz repeated the claims to the imamate and claimed—falsely—that al-A'sam's forefathers had recognized his ancestors and been their servants. The Qarmatian leader was exhorted to remember their common origins and their common opposition to the Abbasids—whose end was imminent and divinely ordained—and to repent and submit to the Fatimid imam–caliph. Al-Mu'izz gave the Qarmatian commander three choices: to return all booty and pay reparations for the Fatimid soldiers killed so far, to raise the dead back into life, or finally to simply depart with his army, in which case however al-Mu'izz promised to hunt al-A'sam down and bring him to Cairo in a cage. Al-A'sam is said to have sent only a laconic reply: "Your letter, which is very long-winded but not very substantial, has reached us; we are following on its heels". Al-A'sam not only rejected al-Mu'izz's claims, but made the letter public and reaffirmed his opposition to the Fatimids and their claims, launching another invasion of the Fatimid domains in spring 974.

Once again, the Qarmatians found support among the local populace, which was exhausted by the Fatimids' heavy taxation. Al-A'sam occupied the eastern Nile Delta with the main army, but a smaller force under the sharif Akhu Muslim bypassed Cairo and encamped between Asyut and Akhmim, driving out the Fatimid officials and collecting the tax revenues of Middle Egypt for the Qarmatian cause. Akhu Muslim's manoeuvre was all the more dangerous because many of the leading ashraf families flocked to join him. In April, al-Mu'izz sent one of his best generals, Rayyan, to the Delta. Rayyan defeated a Qarmatian force at Mahalla, but al-A'sam moved the main Qarmatian army to Bilbays, from where he threatened Cairo. Again the Fatimids were forced to a general call to arms of the entire male population of the capital to confront the Qarmatian advance. On 4 April, the Qarmatian advance guard attacked the Fatimid positions at Ayn Shams. The Fatimids' Berber soldiers repulsed the attack, but during the pursuit they were in turn surprised by a counterattack and suffered heavy losses. This led to the defection of one of the Fatimid commanders, Ali ibn Muhammad al-Khazin, and riots erupted in Fustat. At the same time, news arrived in the capital that Akhu Muslim had defeated a Fatimid army at Akhmim. Fearful of betrayal by the former Ikhshidid commanders now enrolled in his army, on 12 April al-Mu'izz arrested their sons as hostages.

On 27 April, al-Mu'izz's son and designated heir Abdallah led the Fatimid army out to confront the Qarmatians at the dry lake bed known as Jubb Umayra or Birkat al-Hajj, just north of Ayn Shams. Al-A'sam divided his army, sending his brother, al-Nu'man, to face the Fatimid advance, while he himself remained on a height dominating the lake bed. Abdallah exploited this mistake, by sending a corps to keep al-A'sam in check, while he destroyed al-Nu'man's force. He then turned on al-A'sam, who was defeated and barely escaped capture. The Fatimid victory spelled the end of the invasion. 10,000 Berbers pursued the Qarmatians, cutting off their supply routes, and recovering Palestine and southern Syria before the year was out; while in the south, Akhu Muslim dispersed his small army and barely managed to escape capture himself. Hunted by Fatimid agents, he sought refuge in al-Ahsa, but only ended up being poisoned by the Qarmatians, who were now facing attacks by the Buyids on their home territories and were engaged in peace negotiations with the Fatimids.

Final years
Forced to retreat from Syria, the Qarmatians allied themselves with Alptakin, a Turkic ghulam formerly in Buyid service. Alptakin invaded Syria and captured several cities, before turning on Damascus, whose populace received him enthusiastically when he entered the city in April 975. In July 976, a Fatimid army commanded by Jawhar appeared before Damascus, and placed it under siege. The Qarmatians reacted by sending an army to aid Alptakin—according to some sources, the Damascenes appealed to the Qarmatians for aid—forcing Jawhar to lift the siege in January 977. The allies pursued Jawhar to Ramla, where they were joined by the Banu Tayy; Jawhar was defeated in a pitched battle at the Yarqon River, and was forced to abandon Ramla and retreat to Ascalon. The allies entered Ramla on 12 March.

Most sources report that al-A'sam, already ill, died a few days after the allies entered the city. He was succeeded by his brother (or cousin) Ja'far. According to the account of Ibn al-Qalanisi (followed by Ibn al-Athir), however, al-A'sam was still active when the new Fatimid caliph, al-Aziz Billah, took the field in person and defeated the allies in summer 978. Following his victory, al-Aziz neutralized the Qarmatian threat by offering an annual tribute of 30,000 dinars (other sources give the sum as 20,000 or 70,000 dinars), paid in advance for that year, for the Qarmatians to recognize Fatimid suzerainty, abandon Palestine and return to Bahrayn. Although al-A'sam is reported as active during these events, more likely it reflects a confusion with his successor. At any rate, the agreement with al-Aziz marked the end of Qarmatian presence in the region.