Live updates: Follow the latest news on Israel-Gaza
Israel's devastating bombardment of the Gaza Strip has put Egypt in a serious predicament: should it offer civilians from the coastal enclave a safe haven in its territory and contribute to the "emptying" of Gaza, or shut its border and leave 2.3 million people on the receiving end of Israel's wrath?
The first option would help what Cairo sees as a dangerous plot to create an alternative homeland for the Palestinians in Egypt's sparsely populated Sinai Peninsula, rather than an independent state in Gaza and the West Bank, a longstanding demand by the Palestinians and Arabs that has been ignored by Israel.
An exodus from Gaza would be viewed as another nakba, the Arabic word for catastrophe that is used to describe the flight of Palestinians from their homes in what is now Israel from the violence of armed Jewish groups before, during and after the 1948 Arab-Israeli war sparked by the creation of Israel.
The second choice facing Egypt – keeping the border shut – would indirectly result in many more Palestinian deaths as Israel shows no sign of ending or moderating its ruthless retaliation to the deadly weekend attacks by Gaza-based Hamas militants in southern Israel.
It would also leave President Abdel Fattah El Sisi and his government open to criticism at home and across the Arab and Muslim worlds for denying Gaza's Palestinians a chance of survival, leaving them to face an Israeli air campaign, the unprecedented ferocity of which has pulverised entire neighbourhoods.
The death toll from the Hamas attack and Israel's bombardment had passed 2,600 by Thursday, with thousands more injured.
Inflammatory Sinai plan
Right-wing Israeli politicians have repeatedly floated the idea of giving the Palestinians a homeland in Sinai and in Jordan as an alternative to their demand for an independent state comprising the Gaza Strip and the occupied West Bank, with East Jerusalem its capital, what has come to be known as the two-state solution.
"It's a very, very real danger, especially this time round," said a senior Egyptian diplomat about the possibility of an influx of Palestinians from Gaza into Egypt. "It's a very likely scenario, almost inevitable if Israel makes good on its threat to launch a ground offensive.
"It will be like a second nakba," said the diplomat, who is regularly briefed on Cairo's deliberations over the situation in Gaza and its contacts with Israel and world powers over the current violence.
On Thursday, Egypt sought to step up pressure on Israel to agree to its repeated calls to allow the opening of safe corridors to deliver humanitarian aid to Gaza, a suggestion the government of Prime Minister Benjamin Netanyahu is apparently rejecting while it enforces a complete blockade of Gaza.
The Egyptian Foreign Ministry said it wanted international aid for the Gaza Strip to be flown to Al Arish airport in the north of the Sinai Peninsula, not far from the border crossing in Rafah.
It also denied that Egypt had closed the Rafah crossing, saying its operation was only disrupted because of Israel's bombardment of the Gaza side. It asked Israel to refrain from targeting it again.
Egypt's association with Gaza dates back to the 1948 Arab-Israeli war, which left the territory under Egyptian administration until the next war in 1967, when Israel swiftly captured Gaza as well as the Sinai Peninsula and the West Bank. Egypt regained the rugged and mountainous peninsula, sandwiched between the Mediterranean and the Red Sea, under a 1979 peace treaty with Israel.
Israel's occupation of Gaza ended when it unilaterally pulled out from the strip in 2005. Two years later, Hamas seized control of the coastal enclave, throwing out supporters of the mainstream and moderate Fatah movement led by Palestinian Authority President Mahmoud Abbas.
An Egyptian-Israeli blockade of Gaza followed and continues to this day, albeit with varying degrees of restrictions.
A mass influx of Palestinians from Gaza into Egypt is not without precedent.
In 2008, an estimated 700,000 Palestinians from the strip stormed the Egyptian border crossing in Rafah. Incited by Hamas, the incident was meant as a protest against the blockade. Egypt reacted angrily to the influx and ensured that everyone returned to Gaza within days.
But a ground offensive and the street-to-street and house-to-house fighting it is likely to entail could send many more fleeing to Egypt to escape being caught in the crossfire.
Already, more than 360,000 people have been displaced in Gaza as a result of the bombardment, finding shelter at UN-run schools, with relatives or with strangers who opened their homes.
Hospitals are overwhelmed, running out of supplies and may shortly have no power at all as fuel for generators runs out.
Egypt, which also borders Israel, has mediated several truces between Hamas and Israel, most recently in 2021. It has over the years set aside its own aversion to political Islam and cautiously forged working relations with the militants of Hamas and other extremist groups in Gaza.
Those ties were in large part a reflection of its fears that Gaza's militants could be a source of material support to militants who have been fighting its security forces for years in northern Sinai. They are also essential to its efforts to reconcile rival Palestinian factions to get them to speak with one voice in future peace negotiations with Israel.
But Egypt's efforts to mediate an end to the current violence has made no headway and may have been moved down Cairo's list of priorities as it becomes entirely focused on avoiding a Palestinian exodus.
"There will be no lenience or squandering of Egypt's national security under any circumstances," Mr El Sisi said, alluding to the danger of a mass movement of Palestinians into Egypt.
"The Egyptian people must be aware of the complexities of the situation and realise the magnitude of the threat. Egypt will not allow the liquidation of the Palestinian question at the expense of other parties."
Foreign Minister Sameh Shoukry was less subtle when he addressed an Arab League meeting in Cairo on Wednesday.
"The people of the [Gaza] Strip are being forced to flee their homes ... I emphasise our total rejection of any attempt to liquidate the Palestinian question through military means or eviction at the expense of nations in the region."
A statement by Arab foreign ministers issued after their meeting echoed his comments.
"We must collectively confront any attempt to transfer the crisis made worse by the continuation of the [Israeli] occupation to neighbouring nations," it said.