The four-day-long Libyan–Egyptian War ends.
On July 21, 1977, there were the first gun battles between troops on the border, followed by land and air strikes. On July 24, the combatants agreed to a ceasefire under the mediation of the President of Algeria Houari Boumediène and the Palestine Liberation Organization leader Yasser Arafat.
Relations between the Libyan and the Egyptian government had been deteriorating ever since the end of Yom Kippur War from October 1973, due to Libyan opposition to President Anwar Sadat’s peace policy as well as the breakdown of unification talks between the two governments. Frequent, politically-driven deportations of Egyptian migrants working in Libya also contributed to tense bilateral relations. There is some proof that the Egyptian government was considering a war against Libya as early as 1974. On February 28, 1974, during Henry Kissinger’s visit to Egypt, President Sadat told him about such intentions and requested that pressure be put on the Israeli government not to launch an attack on Egypt in the event of its forces being occupied in war with Libya. In addition, the Egyptian government had broken its military ties with Moscow, while the Libyan government kept that cooperation going. The Egyptian government also gave assistance to former RCC members Major Abd al Munim al Huni and Omar Muhayshi, who unsuccessfully tried to overthrow Muammar Gaddafi in 1975, and allowed them to reside in Egypt.
During 1976 relations were ebbing, as the Egyptian government claimed to have discovered a Libyan plot to overthrow the government in Cairo. On January 26, 1976, Egyptian Vice President Hosni Mubarak indicated in a talk with the US Ambassador Hermann Eilts that the Egyptian government intended to exploit internal problems in Libya to promote actions against Libya, but did not elaborate. On July 22, 1976, the Libyan government made a public threat to break diplomatic relations with Cairo if Egyptian subversive actions continued. On August 8, 1976, an explosion occurred in the bathroom of a government office in Tahrir Square in Cairo, injuring 14, and the Egyptian government and media claimed this was done by Libyan agents. The Egyptian government also claimed to have arrested two Egyptian citizens trained by Libyan intelligence to perform sabotage within Egypt. On August 23, an Egyptian passenger plane was hijacked by persons who reportedly worked with Libyan intelligence. They were captured by Egyptian authorities in an operation that ended without any casualties. In retaliation for accusations by the Egyptian government of Libyan complicity in the hijacking, the Libyan government ordered the closure of the Egyptian Consulate in Benghazi.
The Libyan government claimed to have uncovered an Egyptian espionage network in Libya. US diplomatic circles viewed this tension as a sign of Libyan intentions to go to war against Egypt, and one diplomat observed:
LARG Libyan Arab Republic Government anticipates military attack from Egypt, which it hopes to exploit and cause overthrow of Sadat.
Throughout 1976 the Egyptian government was concentrating troops along the Libyan border. It enjoyed the support of the US government, who viewed Libya negatively, and was promised by Washington that no move in US-Libyan relations was to be made without consultation with Cairo. Policy experts in the US and Britain assessed that Sadat was planning an attack on Libya in order to overthrow Gaddafi. Relations kept deteriorating, and in early May 1977 Sadat turned down an American request to engage in reconciliation talks with the Libyan government.
Tensions between the two countries had increased during April and May 1977, as demonstrators attacked each other’s embassies. In June 1977, Libyan leader Gaddafi ordered the 225,000 Egyptians working and living in Libya to leave the country by July 1 or face arrest.