It is a complex relationship which varies from town to town, reflecting the situation in Libya, a fragmented country. It is worth exploring this dynamic, because if Ansar al-Sharia were to join forces with the Islamic State (which is unlikely, because it tends to move in the opposite direction, in favour of al-Qaida) then all of a sudden the Islamic State in Libya would no longer have the problem of labour shortage, from which it is suffering today. If, however, an unrelenting struggle were to break out between the two organisations, the Islamic state would be forced to face an enemy very similar to itself, and consequently more lethal.
Four examples can be used to describe the different nuances of this relationship. The case of absolute harmony occurred in Sirte, where the local arm of Ansar al-Sharia has almost totally merged with the Islamic State (with the exception of a few individuals, who have distanced themselves from the area or who have promised not to proselytize). According to sources cited by the British newspaper The Telegraph, it was precisely Ansar al-Sharia that formed the original core of the Islamic State in Sirte. The group would not be as strong in the area today without that first advantage.
The shield against military intervention
Further to the west, in Sabratha, midway between the capital Tripoli and the Tunisian border, a relationship of functional coexistence exists between Ansar al-Sharia and the Islamic State. The group conceals its own existence behind the shield created by the strong presence of Ansar al-Sharia which, despite being considered an extreme Jihadist group, is not linked to international terrorism in the way the Islamic Sate is (even if it is on the list of terrorist groups), and therefore does not raise the debate on outside military interventions. One source, in the nearby port town of Zuwara, tends to describe this dual presence as a kind of optical illusion: "They are all one and the same thing, but with different labels". It is important to bear in mind that for as long as it shelters behind the mantle of Ansar al-Sharia, the Islamic State in Sabratha is in no danger of being disturbed.
In Benghazi, the most violent front in the war being fought by Islamist groups against the Libyan army of General Khalifa Haftar - loyal to the government in Tobruk - there is a pragmatic non-aggression pact between the Islamic State and Ansar al-Sharia. It is a third type of relationship - not a merger, as in Sirte, not a coexistence, as in Sabratha, but rather a deconfliction, a word often used today to describe the relationship between Russia and the United States in the war against the Islamic State in Syria: they don't hamper each other, but they can not be considered allies. In Benghazi it works in the same way between the two groups. There are considerable tensions between them, but they do not have the forces to fight each other whilst they are waging war against the armies of General Haftar. From a tactical point of view, their situation is difficult, because the only way they can access the city is from the sea, by boats. If they were to clash, the first thing that would disappear would be this logistical access through the port area, and without logistics they would be incapable of holding the front against the government soldiers. A source in Misurata explains that the Islamic State in Benghazi would start a fight against Ansar al-Sharia, in retaliation for what took place in Derna.
Derna is the model at the other end of the spectrum: total conflict. In mid-June the local council of the Mujahideen, of which Ansar al-Sharia is also a part, drove the Islamic State out, gun in hand, forcing it to retreat to the countryside to the south-east, in the area of Fattayah. If Ansar al-Sharia in Benghazi is under the command of the local council of revolutionaries, in Derna it is a minority component. But what can be said is that in general the other groups gravitate within its orbit in Libya, and not the other way around.
In a video, recently released by the Islamic state, it called Ansar al-Sharia "a deviant group", a step before accusing them of apostasy. This dynamic is reminiscent of Syria, where the Islamic State refrains from excommunicating some movements completely, in the hope of co-opting them, whilst at the same time always making an inevitable condition perfectly clear: no movements will be allowed to operate when and where the Islamic State is present, and those who fail to disband will, as a consequence, be deemed an enemy. It is very telling that the Islamic State has included the logo of Ansar al-Sharia between the groups that, even without having taken a conscious decision, are in fact helping the American "infidel".
*Daniele Raineri is a correspondent with Il Foglio
Stay up to date: sign up for our newsletter
For insights and analysis subscribe to our biannual journal