Several weeks ago an Islamist and jihadist alliance led by Ansar al-Sharia--a group with ties to Islamic State (formerly ISIS)--took control of Benghazi and declared an "Islamic Emirate." A few days ago, an Islamist alliance took control of Tripoli's main airport. These developments have come as a shock to the Egyptian government, which considers an Islamic state on Egypt's 720-mile long western border an immediate threat to Egypt's national security. This helps explain Egypt's alleged role in recent airstrikes inside Libya coordinated with the United Arab Emirates.

Fighting in Tripoli has ravaged the city. Highlighting the gravity of the situation, the U.S. Department of State released a joint statement with the governments of Algeria, Egypt, Morocco, and Tunisia to express their deep concern about the political and security crisis in Libya and to call on all parties to adopt an immediate ceasefire. Last week, a majority of the Libyan parliament voted to call for foreign intervention to protect civilians amid chaos and violence among rival militias engaging in fierce clashes. Parliament met in Tobruk (a port city near the Egyptian border that does not fall under control of Ansar al-Sharia) and adopted "by 111 of the 124 deputies present a resolution calling on the international community to intervene quickly to protect civilians in Libya, including Tripoli and Benghazi."

Libya's instability raises questions regarding the way Egypt will choose to deal with threats of this kind. In addition to What Cairo considers as Islamist threat, the porous borders have allowed a dangerous flow of arms and human trafficking that degrades Egypt's already precarious security. In terms of employment, more than 700,000 Egyptian workers have been employed in Libya, working on construction, agriculture, and infrastructure projects. But with the recent fighting, thousands of Egyptian workers have been fleeing. Earlier this month, 23 Egyptian workers died when their residence was shelled. Egypt's Civil Aviation Ministry has had to organize dozens of flights to Djerba airport in eastern Tunisia to transport the scores of Egyptians that are stranded at the Tunisian border due to lack of visas and necessary paperwork. The head of the Libyan-Egyptian Business Council, Nasser Bayan, believes that Egyptian investments in Libya this year will decrease by 60 percent. The Arab Contractors Company, one of Egypt's largest companies, has temporarily suspended its operations and projects in Libya, and recalled its employees.

As the unrest continues, Egypt has tried to further secure its long and porous border with Libya. It began taking measures to do so at least since late 2011 after the ouster of Libyan strongman Muamar Gaddafi. But recent developments in eastern Libya have particularly alarmed Cairo; 22 Egyptian soldiers were killed last month in clashes with unidentified militants near the western Egypt town of Al-Farafra, a full 120 miles from the Libyan border. Speaking to Egypt's government paper Al Ahram, a high-level intelligence source stated that "urgent measures were needed to secure Egypt's border with Libya. Special Forces, backed by satellite surveillance technology and rapid deployment teams, were on standby to counter any attempts to infiltrate Egyptian territory or smuggle arms across the desert."

In addition, Libya's internal dynamics, especially the growing strength of Libya's Islamist groups, is a cause for concern for Egypt. After the Egyptian government declared the Muslim Brotherhood a terrorist organization in December 2013, Egypt has been especially skeptical of the Justice and Construction Party, Libya's Brotherhood affiliate. Some Egyptian officials fear that the Egyptian Muslim Brotherhood will use Libya as a base to plan its resurgence in Egypt. As a result, Egypt is seeking to form a regional coalition to contain the Brotherhood in Libya. This may mean standing in alliance with retired General Khalifa Haftar, the leader of the campaign against Islamist militias. According to Algerian newspaper ElKhabr, top intelligence officials from Tunisia, Egypt and Algeria met last month to coordinate their efforts to counter radical forces inside Libya. Former Egyptian General Hossam Swailam claimed the terrorist attack on Al-Farafra was "executed by groups trained inside International Muslim Brotherhood training camps in Libya and Sudan."

Genaral Hafter himself called on Egypt to conduct "all necessary military actions inside Libya in order to secure its borders" and stated that "we will not allow these radical elements to threaten our neighbors in Algeria and Egypt." Haftar's Operation Dignity has split the small 35,000 man Libyan army. It is not known exactly how many of those were fighting alongside Hafter, but his forces were defeated by the Ansar al-Sharia's forces in and around Benghazi.

In light of the retreat by Haftar's forces near the Egyptian borders, Cairo may resort to creating a sort of buffer zone along with securing the borders to block all efforts to smuggle arms and potential terrorists. However, such an option could be difficult as the two countries face heavy movements of people and goods even in times of increased violence. In addition, the tribal nature of western Egypt and eastern Libya, including the cross border divide among certain tribes, makes it difficult to control such movement.

In an interview with Egypt's daily Almasry Alyoum, Egypt's minister of foreign affairs Sameh Shoukry did not refute the claim that Egypt supports General Khalifa Haftar, despite his call to solve the Libyan crisis through political means rather than military force. According to Shoukry, "Egypt supports all effort to stabilize Libya and the integrity of its territory."

Many Egyptians expected some form of military action when Amr Moussa, a close associate of Egyptian President Abdel Fattah el-Sisi and Egypt's former foreign minister and general secretary of the Arab League, stated that the current upheaval in Libya has major implications for Egyptian national security. Moussa emphasized the need to build support in case Egypt has to exercise its "right to self-defense."

During a press conference with the Italian prime minister recently in Cairo, Sisi stated: "We have long borders with Libya, and Egypt will safeguard them. On the other hand, there are radical elements entering and conducting terrorist operations inside Egypt," hinting that Egypt might reserve the right to undertake cross border pursuits if the need arises. In other words, depending on whether ceasefire and negotiations actually ensue among Libyan factions, further Egyptian intervention could remain on the table.

The Middle East Institute (MEI) is an independent, non-partisan, non-for-profit, educational organization. It does not engage in advocacy and its scholars’ opinions are their own. MEI welcomes financial donations, but retains sole editorial control over its work and its publications reflect only the authors’ views. For a listing of MEI donors, please click here.