Egyptian authorities have opened the Rafah crossing with the besieged Gaza Strip, allowing Palestinians to travel in both directions for the first time in two months.

The border crossing, Gaza's only gateway to the outside world with no Israeli control, opened on Monday for four days.

Palestinian border official Khaled al-Shaer said about 20,000 people have applied to use the crossing.

Gazans seeking medical care and students are among those expected to cross.

Last week, the Gaza-based interior ministry called on Egypt "to assess the difficult humanitarian conditions in Gaza and open the Rafah crossing urgently to save what can be saved".

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

Israel has imposed a blockade on Gaza - which residents refer to as an "open-air prison" - since 2007.

The border crossing has largely been shut since President Mohamed Morsi was toppled by the Egyptian army in 2013.

Cairo has accused Hamas, which runs the Gaza Strip and is close to Morsi's Muslim Brotherhood, of helping armed groups in Egypt's Sinai desert, which borders Gaza, attack its security forces. Hamas denies this.

In June, Egyptian authorities opened the crossing for four days to allow Palestinians to travel in and out of the territory for the first time in three months.

According Shaer, the Gaza-based government was informed by Egypt that the border crossing will be also opened on September 7 and 8 to allow Palestinians planning to perform Hajj to travel to Saudi Arabia.

Shaer told Turkey's Anadolu news agency that Palestinians stuck in Egypt will also be allowed to return to Gaza on those days.

Source: Al Jazeera and agencies