CAIRO/GAZA (Reuters) – Rival Palestinian factions Hamas and Fatah reached a deal over political reconciliation on Thursday after Hamas agreed to hand over administrative control of the Gaza enclave the group has controlled for more than a decade.

Hamas chief Ismail Haniyeh announced the Egyptian-brokered accord in a statement without providing further details about a deal expected to cover administrative, security and border crossing arrangements in the Gaza Strip.

The Western-backed mainstream Fatah party lost control of Gaza to Hamas, which is designated as a terrorist group by the West and Israel, in a brief civil war in 2007. But last month Hamas agreed to cede powers in Gaza to President Mahmoud Abbas’ Fatah-backed government.

A Hamas official told Reuters that details were expected to be released at a noon news conference (1000 GMT) in Cairo, where unity talks between the rival factions began on Tuesday.

“The president welcomes the agreement reached in Cairo between the delegations of Fatah and Hamas and instructed Fatah’s delegation to immediately sign the agreement,” an official at the office of Abbas told Reuters.

Egypt has helped mediate several attempts to reconcile the two movements and form a power-sharing unity government in Gaza and the West Bank, where Abbas and the Fatah-led Palestinian Authority (PA) are based. Hamas and Fatah agreed in 2014 to form a national reconciliation government, but despite that deal, Hamas’s shadow government continued to rule Gaza.

“We congratulate our Palestinian people on the reconciliation agreement reached in Cairo. We make every effort possible to implement it to start a new chapter in the history of our people,” Hamas spokesman Hazem Qassem told Reuters.

Hamas agreed to hand administrative powers in Gaza to a Fatah-backed government last month. The move was a major reversal for Hamas, prompted partly by the group’s fears of potential financial and political isolation after its main donor Qatar fell into a major diplomatic dispute with key allies.

Palestinian students stand in front of a mural depicting late Hamas leader Ahmed Yassin and late Palestinian leader Yasser Arafat, in Gaza City October 12, 2017. REUTERS/Mohammed Salem

Delegations from the two rivals have been in talks in Cairo this week to work out the details of the administrative handover, including security in Gaza and at border crossings.

Key will be the Rafah point, Gaza’s only border crossing with Egypt and once the gateway to the world for the impoverished coastal territory’s 2 million people. Fatah says it should be run by Abbas’s presidential guards with supervision from the European Union border agency, known as EUBAM, instead of the currently deployed Hamas-linked employees.

“EUBAM Rafah maintains readiness to redeploy to the Rafah crossing point when the security and political situations will allow,” said Mohammad Al-Saadi, press officer for the EU Coordinating Office for Palestinian Police Support.

Any decision on EUBAM deployment would be taken in conjunction with the Palestinian Authority and Israel’s government, he said in a statement.

Under the Cairo-backed unity deal, 3,000 Fatah security officers will also join the Gaza police force. But Hamas would remain the most powerful armed Palestinian faction – an estimated 25,000 well-equipped fighters have fought three wars with Israel since 2008.

Both rivals hope the deal’s proposed deployment of security personnel from the PA to Gaza’s borders will encourage Egypt and Israel to lift tight restrictions at frontier crossings – a step urgently needed to help Gaza revive its economy.

Another major issue of the discussion is the fate of 40,000 to 50,000 public employees Hamas has hired in Gaza since 2007, a thorny point that crashed a previous unity deal signed in 2014.

Hamas and Fatah were also discussing a potential date for presidential and legislative elections and reforms of the Palestine Liberation Organization (PLO), which is in charge of long-stalled peace efforts with Israel.

The last Palestinian legislative election was in 2006 when Hamas scored a surprise victory. This sparked the political rupture between Hamas and Fatah which eventually led to their short civil war in Gaza.