Turkey has increased its military intervention in Libya in recent months, sending ships off the coast, planes to bring weapons, mercenaries and armed drones to the country.This is ostensibly to support the government in Tripoli which is fighting a civil war against forces in eastern Libya. But it is actually part of Turkey’s desire for a greater role in energy exploration in the Mediterranean and aimed at weakening Egyptian-backed opposition forces. In response Egypt’s president hinted during a tour of a massive military base on Saturday, that Egypt might intervene.Libya’s conflict is complex, but at its most basic it is a proxy war. It also has ramifications for the whole region, a hinge on which the power of Turkey, Egypt, the UAE, Russia and Qatar all turn. Iran, Greece, Italy and France are all keenly watching. Egypt, the UAE, Saudi Arabia, Russia, and perhaps France and even Greece, back Haftar. Turkey and Qatar back Tripoli. They have sent thousands of poor Syrian rebels to fight in Libya. Turkey has also used Libya as a testing ground for its armed drones. Turkey has conducted naval exercises with Italy recently and almost clashed with France at sea in an incident NATO is investigating.Ankara is showing its muscle. It publishes maps showing its claim to a huge swath of the Mediterranean that cut off Greece and Cyprus. It brags about sending F-16s and cargo aircraft to off the coast of Libya. It has also sought to strongarm NATO and force the US to intervene in Libya.These are high stakes now. Egypt has been backing General Khalifa Haftar, who Haftar fled Libya’s Qadafi regime decades ago and lived in the US. He returned to Libya to lead an offensive that took Benghazi and the east of the country, vowing to rid it of terrorists. It should be remembered that Libya fell into chaos after the US-led intervention toppled brutal dictator Muammar Gadaffi in 2011.US Ambassador Christopher Stevens was murdered by jihadists in September 2012. The US walked away and Libya fell into battles between extremists, local militias, tribes, and Qatari and UAE-backed groups. From chaos came two sides: The Government of the National Accord (GNA) in Tripoli, a loose confederation of different groups, some of whom are linked to the Muslim Brotherhood and Turkish backing. Turkey’s ruling party has roots in the Muslim Brotherhood movement. Egypt, whose current leader General Abdel Fatah al-Sisi pushed the Brotherhood from power in 2013 in Egypt, vowing to bring stability, has backed Haftar.Haftar would bring to Libya the same kind of military and conservative rule that Egypt and the Gulf monarchies have. Turkey’s rule would bring the kind of instability and extremism it exported to Idlib and other areas it invaded in northern Syria. Both systems seem to ignore the average Libyans who are caught in the middle of almost 10 years of war. Both sides have accused each other of human rights abuses. But Turkey has proven more adept at moving weapons and defense technology to Libya. Its Bayraktar drones have defeated the UAE-supplied Russian Pantsir air defense. It has pushed Haftar back.Now Egypt’s president is signaling possible red lines in Libya. This line could keep the Turkish-backed GNA from Sirte and a strategic airfield at Jufra. The country would be split down the middle. Egypt has a massive army, but it is also an army mostly untested on foreign battlefields.Egypt has been fighting terrorists in Sinai for years and has not defeated them. Turkey however has been sending its army into Syria for years, mostly to fight the Kurdistan Workers Party. But in February Turkish forces clashed with the Syrian regime and destroyed their armored vehicles and air defense. Turkey has recently invaded northern Iraq as well, in a new operation. Turkey’s navy has been more aggressive dealing with the French, who are alleged to support Haftar, and the Greeks, who work with Egypt. Turkey’s F-16s and NATO warplanes have also been more aggressive. When is the last time Egypt had to face off with another real air force? Not for decades.On paper Turkey’s armed forces and Egypt’s are well matched. Both have F-16s and hundreds of fighter aircraft. Egypt’s army is the 9th strongest in the world on paper with thousands of tanks. Turkey’s armed forces are thought to be the 11th strongest in the world. Both countries use western weapons systems linked to the US or NATO. Turkey’s work with NATO likely makes it more effective than Egypt.Both countries are bogged down in counter-insurgency campaigns. Egypt is close to Libya and can easily move an armored brigade or troops to the frontline. Turkey would have to fly them in and it likely prefers using Syrian rebel mercenaries to do its dirty work. That would pit lightly armed Syrians and their Libyan allies against similarly lightly armed Libyans from the Libyan National Army (LNA) of Haftar, backed by some Egyptian forces or aircraft. Russia already has aircraft in eastern Libya.Egypt’s president has now openly hinted that the army could be used on foreign soil. His goal is to get the US to take seriously his demand for a ceasefire. Turkey has said it will build new military bases in Libya and has bragged that it now has bases in nine countries.Turkey is trying to show it controls the eastern Mediterranean, and also controls US policy in Syria, Libya and Iraq. Turkey has demanded the Trump administration do more in Libya and the role of Russia has encouraged the US to be concerned. That means the US is in an awkward position. It wants to oppose Russia, but Egypt is a close partner of the US. Turkey is trying to blackmail the US. Turkey is buying S-400s from Russia and trying to claim that if the US doesn’t act in Libya then Turkey could make trouble for US-backed forces in eastern Syria, or Turkey might spread instability in Iraq, where it is bombing areas in the Kurdish north. All Egypt can do is say that it might intervene to get Washington to take its views seriously. But Trump has signaled he doesn’t want more involvement in the Middle East and “far off places.”Egypt has acted before in Libya. It has carried out airstrikes after attacks in Egypt and on Egyptians. But Egypt hasn’t sent tanks and serious equipment.Nevertheless, Saturday’s speech by Sisi to the soldiers is a major step. On June 9 Turkey’s president said he reached an agreement with the US on Libya. The US had warned about foreign interference in Libya on May 20. The May statement came after the GNA took the key Watiya Airbase on may 18. Sisi met Haftar on April 14, May 9 and June 7, eventually urging a ceasefire. Since then Turkey rejected the ceasefire on June 10 and vowed not to meet with Haftar who Ankara calls a “warlord.” Turkey says Haftar rejected nine previous ceasefire deals.Instead Ankara reached out to Italy to back its own “durable peace” in Libya, one that foresees Turkey and the GNA controlling Libya. Italy cares because it wants the GNA to keep migrants from crossing the Mediterranean. On June 20 the Arab League suggested talks to help heal Libya but the GNA rejected them.We now know other wheels are in motion. Russia, Voice of America reported on June 17, has asked for the US to work with it on Libya. Russia’s foreign minister canceled a meeting with Turkey on June 16, apparently sensing Turkey won’t budge on Libya and it would be a waste of time. Turkey turned directly to Trump and Germany’s Angela Merkel, hoping Merkel will reach out to France and also Greece. Merkel is a key supporter of Ankara’s regime, selling Turkey tanks and also seeking to host Libya talks. Germany pays Turkey, via the European Union, to keep Syrian refugees from coming to Europe.Those Syrians are now being sent to Libya by Turkey, so this works in Germany’s favor. Russia, for its part, may try to heat up tensions in Syria’s Idlib to pressure Turkey on Libya. All these conflicts and refugees are connected. In the meantime the US, through its AFRICOM military commanders, have warned of Russia’s warplanes in Libya on May 26 and June 18.This big question now is Sisi. Will he send the army, or will the US listen to Egypt’s concerns and encourage a ceasefire. The US has trouble not following Ankara’s orders because Ankara can threaten US forces in eastern Syria. Additionally there is a well funded GNA lobby in Washington with connections to pro-Turkey voices that argue US foreign policy in the Middle East must be rooted in whatever Ankara demands.This lobby believes that Ankara will one day turn on Iran and Russia and that the US must give Turkey more concessions to get Turkey to stop working with Moscow and Tehran. Oddly Turkey has also turned to Iran for support in Libya, offering Iran sanctions relief for Iran’s help fighting Kurdish militants in Iraq and aiding Turkey in Syria.The US and Iran might find themselves on the same side in Libya via Turkey. It all hinges on Cairo now. If Cairo has a military footprint in Libya it can do what Turkey has successfully done and leverage it for concessions. For now Egypt must watch and contemplate the next step. Everyone is also looking to Washington to do more than just hint that it supports both Egypt’s ceasefire proposal and Ankara’s approach. What happens next will also affect Washington’s other allies, in Jerusalem and Riyadh and Abu Dhabi.