Al-Hasan al-As'am
Abu Ali al-Hasan al-As'am ibn Ahmad ibn Bahram al-Jannabi was a Qarmatian leader, chiefly known as the military commander of the Qarmatian invasions of Syria 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-As'am 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-As'am 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-As'am 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, Abi 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 were admitted into the ruling council. This means that, although al-As'am 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-As'am 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. The town was plundered for two days, but the locals managed to buy off the Qarmatians with 125,000 gold dinars. Hasan was obliged to agree to an annual tribute of 300,000 dinars to the Qarmatians to maintain control of Syria.Medieval Arab historians 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-As'am 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-As'am 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-As'am 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-As'am proceeded to lay siege to Jaffa with part of their forces under Akhu Muslim, 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-As'am 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 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-As'ar 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. In 973, the Qarmatian–Bedouin alliance disintegrated due to infighting, allowing the Fatimids to seize again control of Palestine and southern Syria. In the same year, the Fatimid caliph al-Mu'izz moved his court to the new capital of Cairo in Egypt. From there the Caliph sent al-As'am a letter, accusing him of abandoning the Fatimid cause to which, as al-Mu'izz claimed, his father and grandfather had been devoted. Al-As'am 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. No details are known, but within a short time in late 973, the Fatimids were again driven out of Syria and Palestine, and in the next spring, the Qarmatians invaded Egypt for the second time.Once again, they found support among the local populace, which was exhausted by the Fatimids' heavy taxation. Al-As'am occupied the eastern Nile Delta with the main army, but a smaller force under the Hasanid 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-As'am 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 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-As'am 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-As'am in check, while he destroyed al-Nu'man's force. He then turned on al-As'am, 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 engaged in negotiations with the Fatimids.
Final years
Forced to retreat from Syria, the Qarmatians allied themselves with Alptakin, a Turkish ghulam formerly in Buyid service. Alptakin invaded Palestine, defeated the Fatimids 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-As'am, already ill, died a few days after the allies entered the city. He was succeeded by his brother Ja'far. According to the account of Ibn al-Qalanisi, however, al-As'am 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, paid in advance for that year. Although al-As'am 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.