Egypt has opened its border with the Gaza Strip for the first time in two months.

The Rafah border crossing opened Monday for four days, allowing Palestinians to travel in both directions. Crossing director Khaled al-Shaer says some 20,000 people have applied to exit. Gazans seeking medical care and students are among those expected to cross.

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.

The crossing has been opened for a total of just 15 days this year.