CAIRO - Egyptian President Abdel Fattah al-Sisi ordered that the Rafah border crossing between Egypt and the Gaza Strip remain open in both directions for a further two days, state news agency MENA reported on Monday.

Egypt opened the Rafah border crossing on Saturday for an initial three days to allow Palestinians to travel in and out of the territory for the first time in three months.

The order to extend the operation to Wednesday was in "solidarity with Palestinian brothers in the Gaza Strip in order to relieve their suffering, in accordance with agreed upon measures," MENA said.

Egyptian state television said the extension came on the occasion of the Muslim holy fasting month of Ramadan, which is due to start later this week.

Gaza, a small impoverished coastal enclave, is under blockade by neighbouring Israel, and Egypt has kept its Rafah crossing largely shut since Cairo's Islamist President Mohamed Mursi was toppled by the army in 2013 after mass protests against his rule.

Two weeks ago, Egypt reopened Rafah for three days but only in one direction - for Palestinians stranded outside Gaza to return home.

Saturday's move, allowing travel in both directions, might signal a cautious improvement in relations between Cairo and Hamas after two years of high tension.

Cairo has accused Hamas, which is close to the Muslim Brotherhood, of helping militants in Egypt's Sinai desert, which borders on Gaza, attack its security forces. Hamas denies this.

But a decision by an Egyptian court earlier this month to cancel a previous ruling labelling Hamas a terrorist group was praised by Palestinian Islamists and raised speculation that relations between Egypt and Gaza may improve.