The GNA and Turkey also signed another pact last month that is strongly opposed by Egypt along with Cyprus, Greece and the European Union: a maritime delimitation agreement. Critics see that deal as Turkey's way of overriding objections to its gas exploration efforts in the Mediterranean Sea.

Hifter’s LNA has been leading an offensive against the GNA in Tripoli since April. On Dec. 12, Hifter announced the “final battle” for the capital.

The GNA Presidential Council responded to Sisi’s statements by saying the GNA “understands the right of the Egyptian government to national security, but it does not accept any threats to Libyan sovereignty." Sarraj added, "We hope Egypt will play a pivotal role in gaining everybody’s trust in the framework of supporting civil peace and stability in Libya.”

Egyptian President Abdel Fattah al-Sisi had reiterated Egypt’s support Dec. 16 for the GNA's rival, the Libyan National Army (LNA), led by eastern military commander Gen. Khalifa Hifter. Sisi said Libyan events affect Egypt’s national security and “some countries are interfering to delay a political solution in the country.” This statement came after Turkish President Recep Tayyip Erdogan offered GNA leader Fayez al-Sarraj military aid, including ground troops, under an agreement signed last month. Sarraj officially accepted Dec. 19.

CAIRO — Recently inked agreements between Turkey and Libya have some of their neighbors fuming, especially as Libya's Government of National Accord (GNA) on Dec. 19 accepted Turkey's offer of military assistance in the battle against its rival.

In a Nov. 28 statement, Egypt's Foreign Ministry described the agreement as “illegitimate and without impact on the rights of the Mediterranean riparian countries."

Ahmad Youssef Ahmad, a political science professor at the University of Cairo and former dean of the Arab Institute of Research and Studies, justified Egypt's criticism of the GNA by telling Al-Monitor the Libya-Turkey agreements "directly threaten Egyptian security and interests."

"The delimitation agreement that goes against Egypt’s interests in the Mediterranean's wealth, and the Turkish insinuation of military intervention in Libya, are dangerous developments that require a significant change in Egypt’s policies," he said.

Claudia Gazzini, a senior Libyan analyst in the International Crisis Group, told Al-Monitor the maritime agreement angers Egypt because it confirms Turkey’s stance in the conflict over gas exploration and drilling in the Middle East.

She said, “It was not only this agreement that angered Egypt, but also the second agreement with the GNA over security and military support, under which Turkey would offer Sarraj’s government training, consultations and equipment, and Tripoli can ask Turkey for field aid, if necessary. This would pave the way for direct Turkish intervention in Libya, which Egypt rejects.”

Egyptian parliament Speaker Ali Abdul Aal said during a recent session that Egypt considers the Libyan parliament in Tobruk, which is affiliated with the eastern-based government that opposes the GNA, the only legitimate entity that represents the Libyan people.

Gazzini added, “Egypt’s recognition of the legitimacy of the [Tobruk] parliament is just an attempt to transfer the legitimate power in Libya from the GNA to the Libyan parliament and to undermine the two agreements signed between Sarraj and Turkey. Egypt will continue its attempts to nullify these agreements.”

On Dec. 18, Egypt submitted a letter to the UN Security Council saying the agreement between Turkey and the GNA violates the council's resolutions regarding Libya and allows the transfer of weapons to armed militias in western Libya. The UN has imposed an arms embargo on Libya since 2011.

Speaking to Al-Monitor by phone, Egyptian former Assistant Foreign Minister Hussein Haridi called on the UN to take quick action regarding the situation in Libya. “The security council and the UN have to live up to their responsibilities and face the deteriorating situation in Libya before it explodes," he said. “Egypt will defend its sovereignty, rights, interests and borders relentlessly and fearlessly, in case its interests in the Mediterranean Sea are jeopardized or face security and military threats.”

The stance of the Libyan diplomatic mission in Egypt sparked controversy. Egyptian and Arab media reported that the mission issued a statement Dec. 14 saying it was defecting from the GNA and siding instead with Hifter and the Libyan parliament. The next day, however, the Libyan Embassy in Cairo completely denied the claim, saying the statement had been forged.

Then, on Dec. 15, the Libyan Embassy said it was suspending work indefinitely for security reasons, which it did not reveal.

Gazzini said, “Egypt and other countries in the region have undoubtedly tried to withdraw legitimacy from the GNA. However, this will be a tough task. The UN’s recognition of the legitimacy of Sarraj’s government cannot be eliminated, since the Libyan parliament [in Tripoli] disintegrated and cannot vote on forming a new government."