President Abdel Fattah al-Sisi said on Wednesday that Egyptians in their millions would reject the forced displacement of Palestinians into Sinai, adding that any such move would turn the Egyptian peninsula into a base for attacks against Israel.
Later, following a phone call between Sisi and U.S. President Joe Biden, a White House spokesman said about 20 trucks carrying humanitarian aid would enter Gaza from Egypt's Sinai Peninsula in the coming days.
White House spokesman John Kirby said the road needed some repairs first, and that he hoped more trucks would follow. The Egyptian presidency said it was agreed that aid should be provided in a "sustainable manner".
Egypt has been trying to channel humanitarian relief to Gaza through the Rafah crossing, but aid has been piling up on the Egyptian side after Israeli bombardments made the crossing inoperable.
Egypt has been alarmed at the idea that Israel's unprecedented bombardment and siege of Gaza, home to 2.3 million people, could force its residents southwards into Sinai.
The Gaza Strip is effectively under Israeli control and Palestinians could instead be moved to Israel's Negev desert "till the militants are dealt with", Sisi told a joint press conference in Cairo with German Chancellor Olaf Scholz.
The border between Sinai and the Gaza Strip has the only crossing from the Palestinian territory that is not controlled by Israel.
"What is happening now in Gaza is an attempt to force civilian residents to take refugee and migrate to Egypt, which should not be accepted," said Sisi.
"Egypt rejects any attempt to resolve the Palestinian issue by military means or through the forced displacement of Palestinians from their land, which would come at the expense of the countries of the region," he said.
Sisi said the Egyptian people would "go out and protest in their millions ... if called upon to do so" against any displacement of Gaza's residents to Sinai.
Referring to the Egyptian position at a Beirut press conference, Hamas official Osama Hamdan called "for rallying around this position and supporting it on the popular and Arab official level because this represents real protection for our Palestinian people."
Egypt is wary of insecurity near its border with Gaza in northeastern Sinai, where an Islamist insurgency intensified a decade ago.
Any transfer of Palestinians to Sinai would mean "that we move the idea of resistance, of combat, from the Gaza Strip to Sinai, and so Sinai would become the base for launching operations against Israel", Sisi said.
Jordan, which shares a border with the Israeli-occupied West Bank and absorbed most of the Palestinians who fled or were driven from their homes as Israel was created, has also warned against Palestinians being forced off their land.
Any plan for the delivery of aid into Sinai is expected to involve the evacuation of some foreign passport holders from Gaza, something Egyptian officials have conditioned on aid getting in.
On Wednesday, after talks with Biden, Israeli Prime Minister Benjamin Netanyahu's office said Israel would not block aid for civilians entering Gaza from Egypt.
Two Egyptian security sources said that while Israel had been obstinate, late on Wednesday it had named locations in Gaza where aid could be sent but had not specified a time when the border crossing could begin operating safely.
New fury was unleashed across the Middle East after a blast at a Gaza hospital killed hundreds of people. Israeli and Palestinian officials blamed each other for the deaths.
Volunteers waiting on the Egyptian side of Rafah performed a funeral prayer for those killed.
Sisi and other Arab leaders pulled out of a planned meeting with Biden in protest over the blast and what they see as Washington's pro-Israel bias.
Hundreds of Egyptians protested on Wednesday in downtown Cairo, and on the Cairo University campus, Reuters reporters said. State TV showed protests elsewhere in the country.
With police trucks standing nearby, protesters in Cairo chanted "Open the crossing!" and "The people want the downfall of Israel!"