Hundreds of people poured through the Rafah border crossing from the Gaza Strip to Egypt after it was reopened briefly but many others were left still stranded after the Israeli army ordered its closure again just hours later.
About 2,000 people managed to cross at Rafah -- Gaza's only gateway to the world that bypasses Israel -- which was supposed to be reopened Thursday from 8:30 am to 8 pm to allow passage for humanitarian reasons.
But hundreds more frustrated Palestinians were left stuck after the Israeli army ordered its early closure for security reasons.
'The terminal closed at 1:00 pm (1000 GMT) after the Israeli army requested it for security reasons,' a spokeswoman for the European Union Border Assistance Mission (EUBAM) told AFP.
She said efforts were under way to re-open the crossing as soon as possible.
Students, the sick, businessmen and visitors from foreign countries who had been stranded in Gaza were among those waiting at the border, which was closed by Israel on June 25 after a deadly cross-border raid by Gaza militants.
'I have been waiting almost two months to leave,' said Wael Halalou, 26, who lined up from 3.30 am with his family, passports in hand, to try to leave en route for the United Arab Emirates where he works as an engineer.
The closure came only hours after an announcement that the crossing would re-open for humanitarian cases from the Gaza Strip to Egypt and thousands of Palestinians had started massing at the border.
'I'm not sure if I can leave today,' said 27-year-old Ola Mighary, who hoped to rejoin her family in Saudi Arabia.
'My visa has now expired and my airplane ticket is no longer valid. Once I get to Egypt it will take several days to sort out. It's going to be expensive,' said the Gaza student, who has been waiting several weeks to leave.
Since June 25, the crossing has been opened just once, on July 18 and 19, to allow Palestinians stranded in Egypt to cross back into the Gaza Strip.
Last November, two months after Israel withdrew from Gaza following a 38-year occupation, the Rafah border crossing began operating under a US-brokered Israeli-Palestinian agreement with EU monitors.
But while many were disappointed, others finally made it across.
'I found work in Dubai,' said 27-year-old Ibrahim al-Muthaqar who was about to hop in a taxi across the border with 10 relatives.
'I'm leaving Gaza, forever,' he said, flashing a wad of passports happily. 'The situation here is intolerable,' he lamented, as the 15 other passengers squeezed into the nine-seat car gesticulated at him to hurry up.