Qarmatian-Hudhayl Conflicts

The Qarmatian-Hudhayl conflicts were a series of two military confrontations between the Banu Hudhayl tribe and the armies of the Qarmatians of Bahrain which took place in the 10th century CE. The conflicts, instigated by the earlier Sack of Mecca, ended with Abu Tahir al-Jannabi fleeing from the Hijaz and returning to Bahrain.

Background
In the year 930 CE, the Qarmatians under Abu Tahir al-Jannabi invaded Mecca and raided the Sacred Mosque along with massacring the pilgrims within the building. The Emir of Mecca was killed in the conflict as well. Afterwards, the sanctuary of the mosque was defiled, with the Black Stone stolen from its original spot near the Kaaba. The motives for the attack are not very clear, and historians including Hugh N. Kennedy theorized that the main motive of the Qarmatians was to direct pilgrimage from the Kaaba and to another place, presumably in Bahrain as well.

First attack by Banu Hudhayl
After the Kaaba and its surroundings had been looted enough, Abu Tahir al-Jannabi ordered one of his soldiers to climb up the Kaaba and break off the Mizab al-Rahma, which was essentially a gutter for the Kaaba that was plated in gold. The Hudhayl tribe, who had camped on the top of the Abu Qubays mountain, began their surprise attack by firing arrows at the soldier, killing him. Abu Tahir sent another soldier who met the same fate. After several failed attempts to break off the gutter, the Qarmatians retreated and left the Sacred Mosque.

Second attack
As the Qarmatians were leaving the Hijaz, a group of the Banu Hudhayl ambushed them relentlessly. Many of the Qarmatian ranks were slaughtered by the Hudhayl, who were eventually able to free the prisoners whom the Qarmatians had taken captive as they were raiding Mecca earlier. After the fighting had died down, the Hudhayl took a large number of camels from the Qarmatians as war booty, before continuing to block any potential exits the Qarmatians could potentially take. Abu Tahir and his soldiers were stranded for a while, until a Bedouin was able to find a safer way for them to exit the Hijaz and return to Bahrain.