The Rafah border crossing between Egypt and the Gaza Strip has been opened for two days so that hundreds of people can cross.
All Palestinians who need medical treatment will be allowed into Egypt, and those who have residency in Gaza will be allowed safe passage from Egypt, officials said.
Palestinians returning from outside of Egypt will also be allowed into Gaza through the Rafah crossing, Nabil Amr,a Palestinian diplomat said, adding that the decision was "humanitarian", and in "response to appeals from stranded Palestinians".
The move followed talks on Sunday between Mahmoud Abbas, the Palestinian president, and Omar Suleiman, Egypt's chief of intelligence.
Ayman Mohyeldin, Al Jazeera's correspondent on the Gaza side of the Rafah crossing, said at best the situation can only be described as chaotic.
"About 1,000 Palestinians have been waiting by the crossing to see if they can get into Egypt, but we have been told that only about 300 or so will be allowed to go through."
Medhat Abbas, from the Palestinian health ministry, told Al Jazeera that there were at least 750 serious medical cases inside Gaza that required either a patient to be transported out or medicine delivered into the territory.
"Only 50 patients are making their way out now, including some who need open-heart surgery. The others are simply waiting on this sunny day to pass through to Egypt.
"Everybody's trying to find a chance to travel and get out of the this prison ... students and others. But this is to the detriment to the patients.
Ehud Barak, Israel's defence minister, on Tuesday ordered most of the crossings between the Gaza Strip and Israel to remain closed after two Qassam rockets were fired fromthe north of the territory into an open area in the western Negev, according to Israel's Ynetnews.
The Sufa crossing - which was reopened briefly by Israel on Sunday to allow the passage of commercial goods - is to remain closed after what Israel said was a "violation" of a recent six-month ceasefire, signed between Israel and Hamas.
The Nahal Oz fuel terminal and the Karni crossing will also remain closed, but the Erez crossing, used for passage of diplomats, journalists, and Gazans requiring medical care in Israel or abroad only, will remain open.
Taher Nunu, a Hamas spokesman, said on Monday that rocket attacks during the ceasefire did not constitute "a national act intending to break the ceasefire".
But Israeli security officials said the move sends a clear message to Hamas that Israel will not ignore the repeated "ceasefire violations".
"Currently we are responding [to the violations] by closing the crossings, but if needed we'll respond in a different manner," one Israeli official said.
Egypt brokered the ceasefire between Israel and Hamas.
Under the six-month deal, which began on June 19, rockets fired into southern Israel by Palestinians were to stop, while the Israelis would halt incursions into territory.
However, last week a Palestinian faction - which did not sign the truce - fired three rockets at Israel in what it said was revenge for the death of one of its commanders in an exchange of fire with Israeli troops in the West Bank.
The Egyptian mediated truce does not extend to the West Bank, where Israel has recently turned its military attention.
The Rafah crossing is the main gateway for Gaza's 1.4 million people to travel abroad.
It was sealed after Hamas seized total control of Gaza, forcing out security forces loyal to Mahmoud Abbas, the Palestinian president, a year ago.
The closure has prevented people from travelling for medical care, studies and family visits, but Al Jazeera's correspondent said that, should the truce between Israel and Hamas stabilise, Rafah may be included as an item in the agreement.
"There was no mention that Rafah was due to be included in the truce agreement between Hamas and Israel, but we understand that it was due to be up for discussion," Mohyeldin said.
"If conditions during the truce stablise, then Rafah is supposed to open for all Palestinians to travel freely to and from Egypt. At the moment, it's only for 48 hours, and most say it's a goodwill gesture by the Egyptians."
In January, Hamas blew up the border wall between Egypt and Gaza, allowing thousands of people to move in and out of Egypt for nearly two weeks before it was resealed.