Hamas and Fatah declared December 1 as the deadline for the Palestinian Authority to take over the Gaza Strip on Thursday.

Hamas has controlled Gaza since 2007, when it forcibly ousted the Fatah-dominated PA from the territory.

However, less than a month ago, Hamas announced its readiness to cede control to the PA.

The rival parties’ agreement on Thursday came after senior Hamas and Fatah delegations met in Cairo for two days.

“The two movements agreed to measures to enable the [PA] national unity government to undertake its full responsibilities in administrating the affairs of the Gaza Strip as it does in the West Bank,” an official Egyptian statement published in PA media said.

Fatah leader Azzam al-Ahmad, who led the Fatah delegation to the Egyptian capital, told a press conference in Cairo that “enabling the government” entails the PA taking over all the government institutions and bodies in Gaza without exception.

Ahmad added that his party and Hamas consented to the PA taking over Gaza’s border crossings with Egypt and Israel and deploying its security forces along the Egyptian-Gaza border.

If the PA takes over the crossings, Israel and Egypt will likely lift several restrictions on the movement of people and goods.

In previous attempts to restore the PA’s presence in Gaza, Hamas and Fatah agreed to place elite, American-trained PA Presidential Guard forces at the Rafah crossing.

It is unclear if Hamas and Fatah were able to come to specific agreements on issues other than the border crossings, such as the future of Hamas’s armed wing.PA President Mahmoud Abbas has said that he would not accept a scenario in which Hamas’s armed wing maintains control of its weapons.

Meanwhile, Hamas leaders have said that their armed wing’s weapons are not up for discussion.

Hamas, Fatah and other Palestinian factions are expected to meet in Cairo on November 21. PLO Executive Committee member Mustafa Barghouti said the meeting in late November will seek to resolve the outstanding issue related to enabling the PA government to operate in Gaza, as well as establish a Palestinian unity government, set a date for general elections and address other issues.

Palestinian leaders from across the political spectrum praised the agreement on Thursday.

Abbas said it “strengthens and hastens the process of ending the division and restoring unity of the Palestinian people, land and institutions.”

Hamas spokesman Sami Abu Zuhri said the agreement “ends a harsh era and restores the unity of our people.”

In Gaza, where Palestinians hope the agreement will lead to an easing of the blockades on the Strip, dozens celebrated in Gaza City, waving Egyptian and Palestinian flags.

“There’s so much happiness here,” a Gaza City resident said. “We hope that we will receive sufficient electricity and clean water and that we will be able to travel abroad.”

The head of the PLO general delegation to the US, Husam Zomlot, thanked President Donald Trump and his team for encouraging the PA’S return to the Gaza Strip.

Zomlot added that the agreement is a historic and crucial step in the direction of achieving peace in the Middle East, stressing that the aim of the agreement is the return of the “legitimate” central authority to Gaza with full civil and security authorities, under one government and one rule of law, identical to the Palestinian government’s responsibilities and authorities in the West Bank.

The envoy expressed gratitude for Egypt’s leadership in facilitating the step. He reconfirmed the Palestinian president’s commitment and partnership with Trump toward achieving a just, lasting and comprehensive peace in the region.