Egypt has temporarily reopened the Rafah border crossing, in one direction, to allow hundreds of stranded Palestinians to return to the Gaza Strip, according to officials.

The Rafah border, the only crossing to Gaza bypassing Israel, opened for three days starting on Saturday, allowing people in but not out.

"Egyptian authorities reopened the Rafah crossing for three days only, from Saturday until Monday, and only in one direction to allow those stranded on the Egyptian side to return home," Palestinian officials said in a statement, describing the move as a "humanitarian" gesture.

READ MORE: Egypt's siege on Gaza - 'Rafah opens only for the dead'

Gaza's border authority also said that more than 20,000 Palestinians, "who are considered humanitarian cases", are stuck in the Strip in desperate need of travelling abroad to receive treatment.

The Rafah crossing is the only remaining gateway for Palestinians in Gaza to the outside world after Israel imposed a stifling blockade on the Strip - enforced also by Egypt - a decade ago.

But it has remained largely closed in recent years because of tensions between Egypt and Gaza's rulers, Hamas.

READ MORE: Ismail Haniya elected new political chief of Hamas

Egypt has severely restricted entry through Rafah since June 2013, when Abdel Fattah el-Sisi became president following the ousting of his predecessor, Mohamed Morsi. 

The United Nations said Rafah opened on a partial basis for 44 days last year, compared to 32 in 2015. Only 1,713 patients were allowed to travel to Egypt for healthcare in 2016.

Prior to the closure, more than 4,000 residents from Gaza crossed into Egypt monthly for health-related reasons, the UN said.    

Born in Gaza: The deadly blockade

Source: Al Jazeera and news agencies