The rapid escalation this year in the numbers of people drowned as they flee in leaky boats across the Mediterranean is a direct consequence of the conflict in Iraq, Syria and north Africa, specifically Libya – where the implications of the Western intervention are playing out in the deaths of thousands, whether from the violence itself or as they try desperately to escape to safety.

Four years ago NATO member states and Arab allies began launching airstrikes that contributed to the fall of Muammar Gaddafi. Now, those same powers are discussing further action in Libya if the UN sponsored peace talks do not end in consensus, but this time the target will be the growing Islamic State movement linked to similar groups in Iraq and Syria.

The legacy of the fall of Gaddafi is the continuing lack of any state institutions coupled with a fragmented security architecture that has divided in to a myriad of armed groups, militias and rival factions that have left the army weak and the country subject to a civil war that has claimed more than 3,000 casualties and numerous human rights violations.

At its heart, the civil war is a conflict between two rival governments in Tripoli and in Tobruk, with only the Tobruk government having UN recognition as legitimate, but left controlling less than half of the country and half of one of the three main cities. This Tobruk coalition contains several former Gaddafi state officials, secularist and federalist elements along with the remains of part of the military.

The UN-recognised government headed by Abdullah al-Thinni, who was appointed by Libya’s House of representatives last year, is opposed by the originally legally installed government, the General National Council, which existed prior to elections held last year. The GNC is backed by a coalition known as “Operation Libya Dawn”, comprising a loose federation of Islamist groups, militias from Misrata and “Berber” groups. In November 2014, Libya’s Supreme Court cancelled the outcome of elections that brought the House of Representatives to power, essentially making its legal mandate void.

The country is also affected by the growth of Islamic State-affiliated groups, which hold territory in the cities of Sirte and Derna, and were responsible for a massacre of 21 mainly Christian labourers in February.

Last Tuesday, the military chief of the Tobruk forces, General Khalifa Haftar, voiced scepticism at any eventual outcome stating that he was “betting on a military solution”. Even with considerable military support from Egypt and the UAE, the Tobruk-based forces have so far failed to make significant progress against the GNC in Tripoli.

This is a critical problem. There does not appear to be a military winner in sight and among all the chaos, a wide variety of armed groups prosper as the centralised control of the GNC in Tripoli in particular weakens.

Ansar al Sharia, for example, is an organisation listed as a terrorist group associated with Al-Qaeda by the UN and is accused of murdering US ambassador Chris Stephens in Benghazi in 2012, but currently has a temporary alliance with Operation Libya Dawn in order to fight Heftar. But Ansar is losing members to the local chapter of IS.

Islamic State rising

IS has grown very quickly beyond its core in the city of Derna. It has a presence in Benghazi and Sirte and even in Tripoli where it has been responsible for a bombing campaign. There are several reasons why IS has expanded but Libyans have a long history of military service overseas and a key driver has been the return of fighters from anti-Soviet movements in Afghanistan in the 1980s, boosted by further fighters returning from Syria and Iraq.

A worrying aspect of the IS growth is proximity to Libyan oilfields – a favourite source of income for the insurgents. This group has also deliberately escalated the conflict to accelerate the fragmentation of the armed groups and enhance the attractiveness of more extreme Islamist groups.

In early April, for example, IS made a calculated attack in murdering 21 Egyptian police officers, prompting Egyptian airstrikes in support of the Tobruk Government’s air assets. While this did not bring Egypt in to the war, it did make that intervention public, reinforcing the view that Libyan stability is critical to Egypt’s domestic security.

The other main player in potential intervention is Italy, which had offered to lead on any UN-sanctioned action in Libya. However, there is significant disagreement over the method of intervention.

What can be done?

The most obvious intervention would be a peace-supporting mission following a UN-brokered peace agreement. This option, currently being led by Spanish diplomat Bernadino Leon, has some momentum amongst pragmatic elements of both rival governments but would need to create a national government capable of working across of these elements and also of maintaining control over government institutions. This government would be able to command international support, but would also need to develop a national approach to combating the growth of IS.

There is hope for this first option and it could command some of the most powerful military groups in Libya, but any UN force could be asked to take control of contested and politically sensitive installations across Libya to prevent those groups taking sole control.

However, this is an option that is likely to take time – and the international community, led by Italy, is unlikely to be very patient over this. With increasing disasters in the Mediterranean involving refugees fleeing the hardships of Libya, the threat of IS reaching Italy looms large – and a more likely approach would be to take the campaign against IS to Libya sooner rather than later.

The most likely outcome, therefore, would be that a UN-brokered peace agreement would be tied to fighting IS and not necessarily tackling the underlying issues fuelling the civil war. Egypt’s involvement in the civil war further complicates this, since any government in Tripoli is unlikely to sanction Egyptian support in any campaign against IS. Such an intervention could eventually exacerbate the conflict rather than solving it through creating new allies for the IS forces that already exist.

This article was originally published on The Conversation.