At the root of Egypt’s declared readiness for direct military intervention in neighbouring Libya is its deepening rivalry with Turkey. The non-Arab nation is regarded by Cairo and its allies as a potent threat to its national security and to the ambitious energy plans Egypt shares with some of Ankara’s other regional competitors. But direct military intervention is not without risk. One is the likelihood of becoming bogged down in an unwinnable war in the vast country. Another is that it could tempt Turkey to expand its foothold in Libya, or for Qatar to use its financial muscle to strengthen Egypt’s enemies there. “Egypt has long been reluctant to get militarily involved away from home and I don’t think the Egyptians are excited about the prospect of doing that now,” said Michael Hanna, of the Century Foundation in New York. “It has all the ingredients of something that could spin out of control but the Egyptians’ concerns are legitimate.” Ghassan Sharbel, editor in chief of the pan-Arab, Saudi-owned <em>Asharq Al Awsat </em>daily, wrote on Monday that: "The Turkish role in Libya has gone beyond the boundaries of Egypt's tolerance. It has morphed into a direct military intervention. “Egypt cannot ignore that Turkey’s military actions in Libya poses a threat, not just to its role but also to its stability.” Egypt’s relations with Turkey have been fraught with tension and distrust since 2013. That year President Abdel Fattah El Sisi, then defence minister, led the military’s removal of a president, the Muslim Brotherhood's Moahmmed Morsi, who enjoyed Ankara’s patronage. Cairo has since accused Turkey of supporting extremist groups, meddling in the affairs of Arab nations and seeking to restore the power and control Ottoman Turks once wielded over the region. Turkey’s support for the Government of National Accord in Tripoli has reversed a 14-month assault there by Field Marshal Khalifa Haftar, commander of the Libyan National Army. The LNA's rapid loss of territory gave the GNA near-complete control of western Libya and emboldened it to press on with a campaign to drive its rivals from territory to the east. It is a scenario that Egypt finds intolerable. It shares a 1,200-kilometre border with Libya and blames militants based there for deadly attacks in recent years against security forces and minority Christians. Cairo also blames militant groups there of smuggling weapons into Egypt and to the hands of extremists fighting security forces in the Sinai Peninsula. With one of the largest armies in the region, Egypt remains haunted by memories of its military intervention in Yemen’s civil war in the 1960s, when its troops fought with republicans against monarchists. But history does not always repeat itself and today’s Egypt is starkly different from that of some 60 years ago. Mr El Sisi is a diligent, hands-on commander in chief with a passion for details and preparedness. A career soldier, he appears to be fully aware of the challenges his men would face if they were sent to Libya to restore order. The country has been fractured by a bloody conflict since a 2011 uprising overthrew and killed longtime dictator, Muammar Qaddafi. “Those who interpreted our patience as weakness are mistaken,” Mr El Sisi said at the weekend, addressing members of air force and commando units stationed near the Libyan border. But he made it clear that his forces would withdraw from Libya when their objectives were realised. “When the issue is settled, the forces will peacefully pull out because we seek nothing except Libya’s stability and security,” Mr El Sisi said. He said that his nation’s military intervention in Libya, if it happened, would be legitimate self-defence under the UN charter. His declaration of intention to intervene in Libya if needed won immediate support from Saudi Arabia, the UAE and Bahrain, three of Egypt’s closest Arab allies. “It is not a declaration of war, but rather an expression of the intention to intervene if the red lines are not heeded,” prominent political commentator Abdullah El Sennawy wrote Sunday. Mr El Sennawy was alluding to the Egyptian leader’s warning that forces loyal to the Tripoli government must not cross the line between the coastal city of Site and Al Jufra to the south. “I expect that Egypt’s first step would be to cross the border in force and then pause,” said Yezid Saiygh of the Carnegie Middle East Centre in Beirut. "In that way, it would signal its seriousness and persuade the other side to stop its advance. “But Egypt has the ability to move a significant number of forces into Libya since it is right next door to the country. "Even then, Egyptian forces are likely to remain in the eastern border region of Libya. Mr Saiygh predicted a strategic stalemate would be the most likely outcome of Egypt’s intervention, sparking a serious diplomatic effort to negotiate a settlement. Egypt’s military might is beyond doubt, if it is judged by the weapons available to its men. Its intervention would probably be heavy on air strikes and light on troops, except for operations by commandos. They are tactics that would minimise casualties and reduce the possibility of the mission becoming bogged down. Egypt became the world’s third-largest arms importer under Mr El Sisi’s watch, spending billions of dollars on the latest hardware that gave it capabilities to operate outside its borders. Since he took office in 2014, Egypt has added significantly to its vast arsenal of US-made fighter-jets, tanks, helicopter gunships and warships. It has bought German-made submarines, French warplanes and high-seas troop carriers equipped with Russian assault helicopters. Without once mentioning Turkey by name, Mr El Sisi said he wanted all foreign forces to leave Libya and militias there to be disbanded. For Egypt, one of the most concerning aspects of Turkey’s involvement in Libya is a maritime agreement between Ankara and Tripoli’s government, which was dismissed as illegal by Cairo. The agreement significantly expanded Turkey’s continental shelf. In theory, that has infringed on Egypt’s plans with Cyprus, Greece and Israel to turn the eastern Mediterranean into a global energy centre after the discovery of natural gas in huge quantities there. Turkey has been unhappy that it was left out of these plans and has been trying to force itself into the scheme. It has explored for gas off the shores of EU member Cyprus, of which Turkey has occupied a third since 1974 when it invaded after a short-lived, Greek-inspired coup. “It is about oil and gas before anything else,” Mr El Sennawy said of Turkey’s regional objectives.