Egypt’s got plans for Libya — to eradicate the Islamists and set it under the firm, autocratic control of a general-turned-hero. If that sounds...

Egypt’s got plans for Libya — to eradicate the Islamists and set it under the firm, autocratic control of a general-turned-hero. If that sounds familiar, that’s because it is. Egypt followed exactly the same model two years ago.

In 2013, then-general and defense minister Abdel Fattah El Sisi ousted Muslim Brotherhood president Mohamed Morsi in a coup-slash-revolution. Since, Sisi has taken it upon himself to rid Egypt of Islamists — and he’s succeeded. The Muslim Brotherhood, by far the most respected and established Islamist institution in the country, is now considered a terrorist organization and its members are either in hiding or behind bars.

But Sisi’s crusade against political Islam hasn’t stopped at Egypt’s borders: he’s also taken the fight to Libya. There, Sisi’s Libyan counterpart, a Gaddafi-era general named Khalifa Haftar, paints himself as the only thing standing between Libyan order and Islamist chaos. This fits neatly into the worldview of Egyptian leaders, and it has inspired Egypt to provide diplomatic and military support to an increasingly hopeless cause.

After Libya’s revolution of 2011, divisions long suppressed by strongman Muammar Gaddafi quickly resurfaced. Infighting between powerful militias and political factions eventually led to dual, rival governments being established. The Islamist-leaning General National Congress took over the former capital of Tripoli, while the House of Representatives was exiled to Tobruk. Both claim to be the sole legitimate government, and both have supported military action against the other. The fighting is slowly leading the oil-rich country down the path to becoming a failed state.

As Libya has descended into violence, Egypt has watched its neighbor with growing concern. The two countries are deeply intertwined. Roughly two million Egyptians worked in Libya before the war and both have long cooperated on intelligence and military matters. They also share a border over 700 miles long, and with an insurgency already active in its eastern region, Egypt is not keen to see a repeat to its west.

Cairo has not simply watched the violence unfold; it’s actively chosen sides. Egypt is aggressively supporting Khalifa Haftar — loosely aligned with the House of Representatives — in his campaign against the government in Tripoli. Cairo has given arms to the general’s Libyan National Army, even backing it up with secret airstrikes. Perhaps most important, the country has provided Haftar’s aging LNA air force with spare parts necessary to keep its Soviet-era jets flying.

Despite government denials, the United Nations believes Egypt has also given the LNA entire aircraft. Five LNA MiG-21s and at least two Mi-8s have been attributed to military assistance from Cairo. The LNA also claims to possess four Su-27s, although it’s unclear how the group might have obtained the advanced fourth-generation jets.

Wolfram Lacher, a North Africa researcher for the German Institute for International and Security Affairs, described to War Is Boring just how essential Egyptian support is for Haftar. “Egyptian military support for Haftar has been very significant, particularly by helping Haftar to repair and maintain his fighter jets,” Lacher said. “Haftar’s air force and his access to external backing have been by far his two most important assets.”

Allegiances in post-revolutionary Libya are complex and quickly changing. While Haftar’s LNA enjoys loose support from many anti-Islamist militias, his own personal situation is far from certain. Lacher noted that Egyptian interference keeps Haftar afloat. “He [Haftar] has had very tense relations with many military commanders in his overall alliance. He hasn’t been able to centralize control,” said Lacher. “If not for Egypt, Haftar would be in a very different situation today.”

Egypt has done more than just provide military support. After Gaddafi was killed in 2011, the country provided safe refuge to many former regime figures. The most prominent of these is indisputably Ahmed Gaddafi Dam. A cousin of the deposed colonel and close personal confidante, Gaddafi Dam operated for years as Libya’s unofficial envoy between Cairo and Tripoli.

From his lavish apartment in Cairo, Gaddafi Dam has been vocal in his criticisms of Libya’s Islamists, especially the GNC government in Tripoli. The former security officer maintains that Libya was better off under Gaddafi’s rule, pointing to the rise of violent militias and Islamic State as examples of the failure of its revolution. Gaddafi Dam gives interviews to media outlets whenever possible, famously claiming that Islamic State has likely taken control of 6,000 barrels of uranium, and that “Europe should expect a 9/11 terrorist attack within two years.”

The narrative — however simplistic — of Islamists fomenting terrorism in Libya has been eagerly received by Egyptian leaders. “The Egyptian leadership has been projecting its domestic political threat perceptions — particularly paranoia of the Muslim Brotherhood — onto Libya’s very complex internal conflicts,” Lacher noted, explaining that eastern Libyan figures — namely Haftar and the HoR — have used Egyptian paranoia of Islamists to their political advantage.

While the Egyptian state has superimposed its own politics on Libya, there are valid security concerns. The border between the two is vast and difficult to control, and the cross-border weapons trade continues to thrive. Many of the weapons used by militants in Egypt’s eastern Sinai region are believed to have come from Libya, and as the Islamic State raises its profile with attacks like its recent downing of a Russian airliner, the group is likely to gain more access to those weapons.

A recent report by IHS Janes noted as much. “An enhanced level of prestige within the Islamic State movement could lead to a significant increase in funding for Wilayat Sayna [Islamic State in the Sinai], which would enable it to obtain more weapons smuggled in from Libya.”

The most effective way to curb the smuggling would be to reestablish a central Libyan government. For the past year, the United Nations has attempted to meet this goal and broker a peace deal between the GNC in Tripoli and the House of Representatives in Tobruk. While Egypt has paid lip service to the effort, it has actually been one of the main spoilers to the process.

“Of course all governments are stating their support for the U.N.-led process. But then some are more serious than others,” said Mattia Toaldo, a policy fellow with the European Council on Foreign Relations.

Toaldo told War Is Boring that by continually emphasizing its unconditional support for Tobruk, Egypt has effectively de-incentivized the House of Representatives to compromise with its rivals in Tripoli.

Lacher agreed. “The unwavering Egyptian support for the HoR has undermined efforts at brokering a political solution. If the HoR can rely on international backing … why should it compromise, why should it make concessions to form a unity government?”

Toaldo also pointed to another reason for Egyptian support of the HoR. Many of the group’s leaders currently reside in Egypt. Given those dynamics, Cairo would prefer to see its own friends in any future government.

Egypt’s overt gambling on certain political figures in Libya has exerted outsized influence on the unity government negotiations. “To my knowledge, Egypt has done very little to help remove the major stumbling block in the negotiations — i.e., the fate of general Haftar,” Toaldo said. ”He [Haftar] still enjoys full Egyptian support and until that changes he’s not going to walk away.”