ROME — The ongoing crisis in Libya poses the gravest threat to Italian national security, for multiple reasons. Halting flows of undocumented migrants and maintaining energy security are important, but a far more fundamental interest is at stake: ensuring that Libya recovers from chronic instability and civil war and avoids becoming a safe haven for terrorist operations.

There is no central authority in Libya today with the ability to impose its rule across the country. The UN-recognized national unity government of Prime Minister Fayez Al-Sarraj is effectively powerless and has struggled to establish itself in the capital of Tripoli. Its authority is contested by two rival parliaments, each supported by a constellation of militias — the Tripoli-based Islamist parliament led by Khalifa Ghwell and a secular assembly in the eastern city of Tobruk headed by Abdullah Al-Thani.

The mercurial General Khalifa Haftar leads the self-proclaimed Libyan National Army and holds sway in the eastern region of Cyrenaica, receiving support from neighboring Egypt. He has threatened to march on Tripoli, while the Islamist militias of the western city of Misrata — key players in the struggle to oust Muammar Gaddafi and later the Islamic State (ISIS) — are also keen to translate their military superiority into political power. While political disagreements dominate the north, the lawless southern region of Fezzan has become a hub for trafficking of all kinds.

Foreign powers back rival players in Libya, with Qatar and Turkey supporting the Islamists in the west while Egypt and the United Arab Emirates aid their secular allies in the east. Under the Obama administration, the United States limited itself to air and drone strikes against specific terrorist targets. Russia has yet to formally wade into the Libyan quagmire, but its support for Egypt and General Haftar is clear. Italy's European partners, meanwhile, have been either incoherent or unclear about their Libya policy.

Libya risks plunging into a deeper civil war or becoming a safe haven for terrorists of all stripes, even with the recent expulsion of the ISIS group from the coastal city of Sirte. The UN's effort to establish a government of national unity patently failed to bridge the divide between Libya's warring militias, and realism now forces the Italian authorities to look elsewhere for solutions to bring an end to the Libyan war. Local forces capable of restoring order to the country must be brought into the fold, and the United States needs to realize its interest in stabilizing the country before Russia presents it with a fait-accompli as it has in Syria.

There are three broad goals for Western powers in Libya. The country needs solid national institutions to ensure its unity, avoiding a costly east-west partition that would further undermine stability. Energy revenues from Libya's considerable oil wealth must also be shared evenly among the population in a manner that also resolves the thorny issue of international oil concessions. Finally, there needs to be a concerted effort by Libyan forces and foreign allies to end the spread of jihadist terrorism in the country.

The failure of multilateral efforts spearheaded by the UN imply that a better solution would involve a limited group of states with direct interests in stabilizing Libya, including the primary backers of the various factions on the ground. This would enable the parties to reach a preliminary reconciliation deal akin to the ceasefire recently signed in Syria, although it would be preferable if Russia were not at the forefront of negotiations.

This is where Italy could play a central role. Rome has a direct interest in maintaining security in Libya and sorely needs an effective Libyan counterpart to deal with a host of transnational issues, ranging from migration to terrorism. Given its history with the country, the international community views Italy as the primary foreign power in Libya. All the conditions for an Italian-led initiative to end Libya's civil war exist — the ball is now in Rome's court.

See more from World Affairs here