Whenever power is contested in a country—any country—the political fight over who will ascend to the helm provides opportunities for foreign powers to intervene, and in some cases, influence the outcome of the political process.

Such behavior can carry short-term rewards when a new leader, put into power with the help of the foreign government, tilts favorably toward the sponsor; but it also can be counterproductive.

Over the past two years, Egypt, with its long western border with Libya, has sought to insulate itself from Libyan instability and the threat of terrorism emanating from its neighbor by supporting Libyan General Khalifa Hifter and his army.

With that backing, and other support at various times from the U.A.E. and Jordan, Hifter has sought increasing amounts of power at a national level while rejecting the Government of National Accord (G.N.A.), which arose through the Libyan Political Agreement of December 2015 under the auspices of the U.N.-sponsored-Libyan dialogue process. By last autumn, after Hifter finally took back Benghazi, his closest associates told the United States and others that he had decided that all of Libya’s politicians were worthless. Accordingly, he would take immediate action to reclaim all of Libya by a mixture of conquest and acclamation, announce himself the country’s leader, place the country’s cities under military rule, appoint civilians to handle such issues as energy, education, and health care, and forego democratic institutions until Libya was ready for them.

In response, the United States and most of the international actors interested in Libya—including Egypt—told Hifter that Libya’s problems required a political solution rather than a military one. He was further told that international recognition and an end to the continuing U.N. arms embargo could only come once a deal was reached whereby he accepted the G.N.A., and the civilian authority of the country’s Tripoli-based prime minister, Fayez al-Serraj. In turn, any proposed deal would need endorsement not just by the speaker of the House of Representatives (HoR), Agila Saleh Issa, who appointed Hifter and retains his own ambitions from the HoR’s home in the east in Tobruk, but also by a broad range of other Libyan constituencies.

By early May, there had been promising developments. Issa was photographed meeting in Rome in late April with Abdul Rahman Swehli, the head of the Tripoli-based State Council, which, under the Libyan Political Agreement, plays a formal advisory role to the HoR as the country’s parliament. After months of refusals, Hifter finally met Serraj in Abu Dhabi on May 2, a first step toward a compromise and presaging a follow-on in Cairo the week of May 7.

But the Cairo meeting failed to materialize. Instead, Serraj went to Algiers on May 9 to meet with Prime Minister Abdelmalek Sellal, and Algeria’s canny minister for Maghreb, African and Arab Affairs, Abdelkader Messahel. Back in Cairo, Hifter was photographed meeting Egyptian president Abdel Fattah el-Sisi on May 13, who announced his support for lifting the U.N. arms embargo on Libya so arms could be lawfully sent to Hifter’s Libyan National Army. By embracing Hifter so publicly, and pressing for him, rather than the government, to obtain foreign arms, Sisi sent a clear message that it is a not a neutral broker among Libyan political contenders, but has a strong favorite that it backs, period.

Meanwhile, seeking better alignment among key international actors, the U.K. foreign officer invited representatives of each of these North African countries to London to meet on May 12, with France, Italy, the United States, and the U.A.E. to try again to find common ground on Libya.

A major topic for these discussions was a new initiative undertaken by the Libyans, supported by UNSMIL special representative to the secretary general, Martin Kobler, which could provide an alternative path beyond the repeatedly boycotted or stalled talks among rival Libyan leaders. This initiative relies on a provision of the Libyan Political Agreement to create a joint committee made up of representatives of both the State Council in Tripoli, and the House of Representatives in Tobruk, with authority to discuss the current crisis, elections, and constitutional and other legislative matters.

This joint committee could build real dialogue within the framework of the political agreement, provide a more inclusive and deeper basis for reaching political solutions, and become a key mechanism for building support for them.

The joint committee’s chances of success would be markedly increased if the most important sponsors of Hifter convinced him to accept a deal in which he plays only a military role under civilian authority. It is not plausible that a wide range of Libyans would agree to have him both a member of a three-person Presidency Council and the lead figure in a military council and the Libyan National Army.

The recent lethal conflict over control of the Brak Al-Shati base in Libya’s south, which resulted in the death of 100 or more people, highlights the risks for Libya of diplomatic efforts failing to achieve political solutions.

Continuing engagement of the other regional actors will also be vital to progress, as well as signaling by Russia that it wants a united Libya, rather than one whose fate is solely determined by military rule. Involvement by the United States, France, and the United Kingdom, along with other interested actors, will also be essential to keeping key players talking and open to compromises that could, in practice, actually work.