CAIRO -- Egypt has opened the Rafah border crossing with Gaza for the entire Muslim holy month of Ramadan in what would be the longest uninterrupted period of time since 2013. The move -- announced by Egyptian President Abdel-Fatah el-Sissi on Twitter -- is meant as a humanitarian gesture during the annual holiday, one of the few occasions in which Egypt allows some Gazans stranded by a 2007 Egypt-Israel blockade to leave and return to the territory ruled by the militant Islamic group Hamas.

El-Sissi wrote on his official Twitter account that the opening would "alleviate the burdens of the brothers in the Gaza Strip." The announcement late Thursday came just days after Israeli forces shot and killed 59 Palestinians and injured more than 2,700 during mass protests along the Gaza border.

Hamas' leader Ismail Haniyeh said Friday the opening of Rafah was the result of talks with Egyptian officials in a visit to Cairo on Sunday.

Get Breaking News Delivered to Your Inbox

"We are witnessing the outcome through steps Egypt has taken and we hope they continue, develop and increase," he said at a Friday prayer sermon in Gaza City.

The crossing has been open since Saturday so el-Sissi's announcement is technically an extension and Egyptian authorities said 510 people crossed on Wednesday, the majority coming from Gaza into Egypt.

A Palestinian boy looks out a bus window as he waits to travel into Egypt through the Rafah border crossing, in the southern Gaza Strip, May 18, 2018. IBRAHEEM ABU MUSTAFA/REUTERS

On Thursday, 541 people crossed from Egypt into Gaza along with dozens of trucks carrying cement, steel, power engines and medical and food aid from the Red Crescent, the officials said.

Last month, Hamas' Interior Ministry said more than 20,000 people were on exit waiting lists. Through this week, an average of 500 travelers a day moved through the border, mostly leaving.

On Friday, travelers were slowly moving toward the crossing, a bus arriving about every hour with people whose names appeared on lists provided by Hamas officials, who oversee who goes through the border.

Ahmed Habib, 45, a Palestinian who holds an Egyptian passport, has been trying for a year to visit relatives in Ismailia, Egypt.

"We thank President Sisi ... this decision came in the right time because we are really suffering," he said as his bus waited outside the gate in Rafah. "Closing the crossing complicates the suffering."

Monday marked the deadliest day of cross-border violence in Gaza since a 2014 war between Israel and Hamas. Capping weeks of protests, about 40,000 Gaza residents descended on the border area. The high number of wounded has overwhelmed the Gaza health system.

El-Sissi said in televised comments earlier this week that Egypt has been communicating with Israel and the Palestinians in an effort "to stop the bloodshed." He urged Israel to "understand that the Palestinian reactions are legitimate and they should handle it very carefully."

In 2007, Hamas wrested control of Gaza by force, provoking the Israeli-Egyptian blockade that severely restricted the movement of most of Gaza's 2 million inhabitants.

The Rafah crossing is Gaza's main gate to the outside world but has only had sporadic openings since the 2013 ouster of Egypt's elected Islamist President Mohammed Morsi, a high-ranking member of Hamas' parent group, The Muslim Brotherhood. While Egypt has been struggling with Islamic insurgency for decades, militant attacks increased after Morsi's ouster, giving Egyptian authorities more justification to tighten movement to and from Gaza.

Over the years, Egypt has opened the crossing for a few days every two to three months. The announcement doesn't change much in the daily flow of people, an official at the crossing said. He spoke on condition of anonymity because he wasn't authorized to speak to the press.

Traveling has mostly been restricted to humanitarian cases, with priority given to medical patients, students admitted to outside universities and Palestinians with residency permits in third countries about to expire. Palestinian-Egyptians and dual-nationals are also eligible to apply.

El-Sissi's announcement is not expected to ease the lengthy, complicated security procedures that turn Palestinians' trip to the Rafah crossing into a hardship. Egypt's security and intelligence services haves lists of Palestinians allegedly involved in the Islamic insurgency and anti-government attacks during the 2011 uprising that forced longtime President Hosni Mubarak to step down.

Under the banner of combating terrorism, Egypt began razing the town of Rafah in 2014 and demolished most of the residential buildings nearby except for the southern section to curb underground tunnel smuggling of fighters and weapons. Tens of thousands of Rafah residents have been evacuated. Egypt blamed Hamas for smuggling fighters and weapons into Egypt from Gaza through underground tunnels.

The measures were meant to create a buffer zone as part of Egypt's efforts to purge northeastern Sinai of Islamic militants following the 2014 Islamic State group bombings that left dozens of soldiers dead. So far, Egypt has created a 5-kilometer (3 mile) buffer zone and is in a process of expanding it to 7 kilometers (4.3 miles).

Besides the buffer zone, Egypt has declared a state of emergency and imposed a curfew across northeastern Sinai including Rafah, which means travelers arriving after 7 p.m. at the crossing have to wait until 6 a.m. the next morning to leave.

The Egyptian army continues to fight Islamic insurgents in northern Sinai.