Egypt opened its crossing with the Gaza Strip on Wednesday for several hours to allow stranded Palestinians to return to the enclave and for others to leave after five days of closure.
The Rafah crossing is the only gateway to the world for the 1.7 million Palestinians in the Gaza Strip, which is governed by the Islamist Hamas group, an offshoot of the Muslim Brotherhood movement of ousted Egyptian President Mohamed Mursi.
Egyptian authorities ordered the passage closed last Friday after Mursi was removed and amid widescale protests in Egypt.
Ghazi Hamad, Hamas's deputy foreign minister, said the crossing would remain open for a few hours on Wednesday so Palestinians could return and so foreigners, patients due to receive medical treatment in Cairo and Palestinians with residency permits in third countries could leave the Gaza Strip.
"I could not sleep all night and I arrived here very early to travel," said Adel Mohammed, 47, waiting in the sun for the gate to open so he could cross into Egypt for treatment for breathing problems.
"May God protect Egyptian lives. When Egypt is in peace, we are in peace too."
Egypt holds the key to many aspects of life in the territory, from control of Rafah to brokering truces with Hamas's Israeli enemy and trying to heal a rift between Hamas and the rival Fatah faction of President Mahmoud Abbas.
It also has a chokehold over an extensive network of tunnels through which weapons and commercial goods are smuggled to skirt an Israeli blockade of the impoverished enclave and Egyptian-imposed border restrictions.
An Egyptian army crackdown launched months ago on the tunnel network has led to a severe fuel crisis in the Gaza Strip. Fuel arriving from Israel costs double the price of supplies brought in from Egypt via the tunnels.
Once a booming business, construction has slowed because of the restrictions on the smuggling of cement, which has also caused its prices to rocket.
Hamas has avoided any direct comment on Mursi's ousting.