Despite an by the UN Support Mission in Libya (UNSMIL) this week praising the commitment of the various Libyan parties to a dialogue, the continued postponement of the so-called Ghadames II peace talks does not bode well. Backed by external supporters, Libya’s warring factions appear to favor a military solution to the situation, rendering the crisis increasingly beyond repair. If the political vacuum and the chaos in the country continue, the environment will be conducive to the increasing formation of and infiltration by terrorist organizations within its borders, turning Libya into a safe haven for radical groups that may soon obligate the international community to intervene directly and aggressively. Meanwhile, innocent civilians are bearing the brunt of the conflict, with hundreds of thousands internally displaced and those stranded in neighboring countries losing hope of ever returning home.

It is thus time to prepare a robust plan of engagement. If the international community wishes to assist Libya in getting back on track toward a stable, pluralistic country, it should increase engagement by implementing targeted sanctions under UN Security Council Resolution 2174 against those individuals and entities that continue to engage in armed aggression.

Unfortunately, military action has been far too prevalent in Libya. The elected, internationally recognized parliament seated in Tobruk and its government have fully endorsed Operation Dignity, led by General Khalifa Haftar, elevating the forces from militias to part of the Libyan National Army. A harsh battle continues to rage in Benghazi, where Haftar’s troops are trying to evict the armed Islamist militias, especially that of Ansar al-Shariah. Other clashes are occurring in various parts of the eastern provinces, where radical Islamist groups are proliferating. In Derna, particularly, these groups have become entrenched and some have declared allegiance to the Islamic State, creating a dangerous linkage between local Islamist movements and an international terrorist organization. Despite backing from Egypt and the UAE, it seems that Haftar’s troops are not reaching their objectives as quickly as they had assumed, and so the war of attrition is ongoing.

In the west, violent battles are ensuing between Zintani brigades loyal to Tobruk and militias from Misrata, Tripoli, and other mountain cities that comprise Operation Libya Dawn. The latter is solidly in control of large parts of the western coast, but finds itself entangled in clashes with the Tebu ethnic minority in the south that is loyal to the elected parliament in Tobruk and with other tribes allied with the Zintanis. To add to the complexity, Misratan militias recently launched an attack in the east in order to capture the oil fields so far controlled by the rogue militias of Ibrahim Jadhran, who is nominally allied with Tobruk.

This state of continued belligerence is not entirely Libyan-made, as the various Libyan factions are armed and shored up by foreign actors. The Tobruk assembly is strongly supported by Egypt and the UAE, and, until recently, Qatar and Turkey were the main backers of the Islamist militias propping up the rival administration in Tripoli. These developments have turned the Libyan civil war into a proxy conflict, fueling the armed struggles and presenting difficult obstacles to the UN-led mediation effort. Read more recently, Gulf states have exerted strong pressure on Qatar, culminating in the Gulf Cooperation Council’s declaration of support for the Egyptian regime’s fight against radical Islamism. This might mean that Qatar has been forced to comply with the political position supported by Saudi Arabia and the UAE of hostility toward the Muslim Brotherhood and its affiliates. If this is the case, it is possible that Qatar will withdraw its support for Libya Dawn, which will mean a weakening of the operation’s military if Turkey or other allies do not step up to compensate. Regardless of these shifts, external interference has emboldened the respective factions, which have delivered bellicose statements despite their purported commitment to dialogue. This ultimately undermines UN Special Representative Bernardino Leon’s efforts to push for a negotiated solution.

The actions of other members of the international community, intent on upholding the principle of non-interference, have also not been effective. Western countries in particular recently reiterated their full support for the House of Representatives and Prime Minister Abdullah al-Thinni’s government. With the exception of the United Nations, and perhaps Italy, all seem to ignore or pretend to ignore the recent Supreme Court decision that, by some legal interpretations, annulled the process that led to the Tobruk-based parliament’s election. By ignoring the ruling, the legality of the Libyan court system is undermined. And by openly taking sides with Tobruk, the external stakeholders contradict the UN-brokered talks meant to involve all actors. The court decision could have leveled the playing field between the competing governments by providing a sufficient cover for the international community to bring Tripoli to the negotiating table without necessarily decreasing Tobruk’s legitimacy. This opportunity has been squandered.

The narrative pervading policy circles today suggests that decision makers increasingly think that the best route is to engage only the elected Tobruk government at the expense of the rivals in Tripoli and Misrata. Pragmatically, however, this could be an error similar to the one committed at the beginning of the 2011 uprising, when the international community failed to recognize that the revolution was in fact a civil war and that a national reconciliation was needed in the aftermath of Qaddafi’s ouster. Four years on, if Haftar’s troops, with all their international and regional support, were to defeat the forces of Misrata and their Islamist allies, Libya would be plunged into a political crisis that once again would see a large part of its population excluded from a national unity process.

Given its porous borders, it is no surprise that neighboring countries, fearful of the spillover effects of Libya’s conflict, have begun agitating for a solution. Algeria and the African Union are attempting to foster negotiations, and the international community should encourage such talks to be coordinated with the United Nations.

Ultimately, global stakeholders should learn from their mistakes. This means robustly standing behind UN efforts and preparing for heightened engagement that would include more aggressive diplomacy and targeted sanctions to bring Libya back from the brink.