 This gave Mufarrij significant leverage with the Fatimids, who thus could not afford alienating him and risk him switching allegiance to the Fatimids' rivals in Iraq, the Buwayhids.In 981–82, relations between the Jarrahids and the Fatimids collapsed and the former were driven out of Palestine.They sacked a Hajj pilgrim caravan later in 982, then annihilated a Fatimid army at Ayla, before being defeated and forced to flee north toward Homs.