Egypt has temporarily reopened the Rafah border crossing with Gaza for the first time since its closure in late October after a bombing in the Sinai Peninsula, officials have said.

The crossing, which is the only access point to the Palestinian territory not controlled by Israel, will open for four hours on Wednesday and Thursday, a government official said.

"The crossing is being opened for two days to help traffic mainly from Egypt to Gaza," the official said.

The border has been closed since October 24, when 31 Egyptian soldiers were killed in an ambush in the North Sinai area.

The attack, in an agricultural area northwest of the provincial capital El-Arish, was the deadliest assault on Egyptian security forces since the army deposed former president Mohamed Morsi in July 2013.

Meanwhile, a statement released by Egypt’s Ministry of Interior reported that two police officers and a solider were killed in El-Arish on Wednesday. They were killed after their car was targeted by unknown armed men, the ministry said.

In but not out

Palestinian officials said that the Rafah border was operating in only one direction, allowing people in but not out.

Egypt destroys hundreds of homes for buffer

"This measure only applies to those who are stuck outside of Gaza and wish to return and not to Palestinians who want to leave Gaza," Maher Abu Sabha, director of border crossings in the Gaza Strip, told the AFP news agency.

The UN has said that more than 3,500 Palestinians have been stranded on the Egyptian side since the crossing was closed last month.

The closure has also prevented thousands of Gazans from accessing medical treatment or higher education in Egypt and beyond, the UN Office for the Coordination of Humanitarian Affairs said in its latest report.

Egypt has since started demolishing houses along the border to create a security buffer zone and block cross-border smuggling tunnels.

Source: Al Jazeera and agencies