President Donald Trump spoke with Egyptian President Abdel Fatah el-Sisi by telephone on Thursday and agreed to oppose “foreign exploitation” of the situation in Libya, where terrorists, warlords, and rival governments have been fighting ever since the fall of dictator Muammar Qaddafi in 2011.

Trump and Sisi spoke after news that Libya’s internationally-recognized Government of National Accord (GNA) has requested military assistance from Turkey against the rival Libyan National Army (LNA) and its leader, General Khalifa Haftar. The LNA has been laying siege to Libya’s capital city of Tripoli since April.

The political situation in Libya could not be more complex and perilous. While the GNA is recognized by the United Nations and most Western countries as the legitimate government of Libya and Haftar is seen as an insurgent warlord, critics of the GNA regard it as an arm of the infamous Muslim Brotherhood and say it has relied on shady militia groups and outright terrorists to repel Haftar’s assault. Those who see Libya from this perspective tend to applaud Haftar as an effective terrorism fighter who cleaned up the gang-infested, terrorist plagued southern and eastern reaches of Libya before marching on Tripoli.

The LNA on Thursday accused Turkey and its President Recep Tayyip Erdogan of planning to ship al-Qaeda and Islamic State fighters to Libya to serve as shock troops against Haftar’s forces.

“Certainly, militants of Daesh and Al-Nusra Front were smuggled from Syria with the mediation of Turkish intelligence. A large number of militants. This is a very serious issue because one of Tunisian airports is used – the airport of Djerba, where the landing of terrorist groups in Tunisia takes place. They are shipped to Libya via Jabal al Gharbi,” charged LNA spokesman Ahmed Mismari.

“Daesh” is another name for the Islamic State, while the Nusra Front is al-Qaeda’s franchise in Syria. The Syrian government has also claimed Turkey is recruiting jihadists from the Syrian insurgency to fight in Libya.

Haftar’s political support comes from a rival government called the House of Representatives (HOR) based in the port city of Tobruk. In November the HOR furiously denounced a memorandum of understanding for security cooperation signed between the GNA and Turkey, calling it a “flagrant breach” of Libya’s sovereignty.

The Tobruk government warned the GNA-Turkey deal would give Turkey access to all of Libya’s sea and air space and allow it to construct permanent bases on Libyan soil. The HOR said the deal “does not only threaten the Libyan national security but also threatens the Arab national security and peace in the Mediterranean Sea.”

For their part, Haftar and the HOR enjoy the support of Egypt and the United Arab Emirates, plus (oddly) France and (disturbingly) Russia. France ostensibly wants a political solution between the rival GNA and HOR but has covertly supported Haftar’s military efforts because it thought he could quickly pacify the country and eliminate jihadist threats to French interests in Africa.

The GNA claims, with some support from U.S. officials, that Russia is supplying mercenaries to bolster Haftar’s forces. Moscow denies playing any role in the conflict. Additionally, Haftar’s critics say that while he accuses the GNA of allying itself with terrorists and the Muslim Brotherhood, he has troubling ties of his own to hardline Salafist Islamic extremists.

A statement from the U.S. State Department last week expressed exasperation with both sides of the conflict as rumors of possible Turkish involvement grew:

The United States is concerned by the Government of National Accord’s request for military support, and by the LNA’s threat to use foreign-supplied air assets and mercenaries to attack Misrata. External military intervention threatens prospects for resolving the conflict. We deplore attacks on innocent civilians and call on all sides to refrain from escalation. The United States is prepared to work with the UN and all the parties to initiate political negotiations.

Turkey is not noted for having a soft touch when it comes to foreign interventions, so other regional powers are muttering about the possibility of regional destabilization if Erdogan puts real muscle behind his swing at Haftar. Algeria’s new President Abdelmajid Tebboune convened an emergency security meeting on Friday to lay out contingency plans for dealing with the fallout of a Turkish attack on the LNA.

Turkey’s rival Greece sent its Foreign Minister Nikos Dendias to Benghazi to meet with ministers of the Tobruk government last weekend and discuss how a Turkish presence in Libya could change the balance of power in the eastern Mediterranean. Greece and Cyprus denounced Turkey’s accord with the GNA as a violation of international maritime law and the prelude to a Turkish grab for regional resources. Greece punctuated these complaints by booting the Libyan GNA’s ambassador out of Athens.

The Greeks have been collecting support from the European Union for their position, which could swiftly make a chaotic situation even more complicated because most of the EU, other than France, has backed the GNA until now.

Egypt is still squarely behind Haftar, and may find itself playing on the same team in Libya as Israel, which is deeply concerned about a Turkish invasion threatening Mediterranean shipping. Israel denounced the security accord between the GNA and Turkey last week and signaled to Cyprus and Greece, its partners in a proposed undersea gas pipeline project, that it considered the accord “illegal.”

“But that doesn’t mean we are sending battleships to confront Turkey,” Israeli Foreign Minister Israel Katz added. Greece is giving indications that it might be willing to intervene against Turkey in Libya, while Egypt conducted maritime military drills in mid-December to remind Turkey and the GNA that it has the ability to project power through the region.

The Turkish opposition on Friday warned that Erdogan could violate U.N. Security Council resolutions on Libya by shipping weapons in violation of an arms embargo. It also said Erdogan risked destabilizing Libya even further by intervening and might jeopardize Turkish national security by sharing classified information with the more unsavory Libyan military forces supporting the GNA.

The opposition feared Erdogan could put Turkey in the position of shipping arms to “jihadist organizations fighting on the ground with the Libyan government.”