Egypt opened its borders with the Gaza Strip for the first time in months Saturday, allowing Palestinians to enter and leave the isolated coastal strip.

The Rafah border crossing will operate for six hours a day for the coming three days and 15,000 people Palestinians have applied to exit to Egypt, said Maher Abu Sabha, head of the Gaza side of the crossing. He said those were humanitarian cases and included medical patients, students and Arab residents whose residency permits were about to expire. However, he said only 1,500 of those were actually expected to pass through.

Rafah is Gaza's only gateway to the outside world with no Israeli control. Egypt has kept it mostly closed since the militant Hamas group seized control of the coastal strip in 2007. The closure worsened after Egypt's military ousted Islamist President Mohammed Morsi, a Muslim Brotherhood member, in 2013. Hamas is an offshoot of the Brotherhood.

Egypt has opened the Rafah crossing in both directions only five days this year. Last month, it allowed the return of Palestinians stranded in Egypt.

Outside the crossing, hundreds of Palestinians struggled for a chance to ride one of the buses that would go inside the crossing. One hopeful traveler, Khaled Abu Okal, 27, was a doctoral student at a university in Malaysia who came to visit his family after last summer's war and has been unable to leave since.

"If I cannot make it through this time, I will lose just another (academic) year," Okal said. "I already lost one."

Outside the hall, a woman and her children sat in the dirt with tears in their eyes. Mother Youssra Abu Qouta said she wants to take her two daughters, ages 9 and 11, for treatment in an Egyptian hospital.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

"I come here every time the crossing opens, but no luck," she said. "We are thrown here like dogs."

The opening of the crossing is seen as a humanitarian gesture by Egypt ahead of the Muslim's holy fasting month of Ramadan.