Hamas has agreed to dismantle the administration that runs Gazainfo-icon, it said on Sunday, in a major step towards handing over control of the Palestinian enclave to a unity government after a decade of bitter rivalry with President Mahmoud Abbas.

The Islamist group led by Ismail Haniyeh, which has ruled Gaza since a brief Palestinian civil warinfo-icon in 2007, said it had taken "a courageous, serious and patriotic decision to dissolve the administrative committee" that runs the territory of two million people, and hand over power to some form of unity government.

Reunification a decade after Hamas and Mr Abbas's Fatah movement battled for control of Gaza may hinge on whether complex issues related to power-sharing -- which stymied reconciliation bids in the past -- can be resolved.

Fatah-led administration praises decision announced after Egyptian mediation

The Fatah-led government, based in the West Bank, hailed the move, announced after Egyptian mediation, as "a step in the right direction". Cairo's efforts had presented a "historic opportunity" that could lead to a new Palestinian election and ultimately statehood, a spokesman told the official news agency WAFA.

But Fatah said it still needed clarification from Hamas on the handing over of government ministries in Gaza and control of the enclave's border crossings with Israelinfo-icon and Egyptinfo-icon.

Hamas and Fatah agreed in 2014 to form a national reconciliation administration but could not agree on the details. A unity government formed after Hamas won the last Palestinian general election, in 2006, was short-lived. Aiming to pressure Hamas to relinquish control of Gaza, Mr Abbas cut payments to Israel for the electricity it supplies to the enclave, leading to power provided for less than four hours on some days, and never more than six hours a day.

Azzam Al-Ahmad, who headed Fatah's delegation to the talks in Cairo, told WAFA: "This step will enhance the unity of the Palestinians and end ugly division."

The two parties did not meet at the talks which took the form of shuttle-diplomacy with Egyptian officials mediating. Mr Ahmad said the two sides planned to meet face-to-face but gave no date. Other Palestinian factions would join the talks later to discuss practical steps to implement the agreement, he added.

Mending fences with Western-backed Mr Abbas would be another step in Hamas' diplomatic push to improve relations with its neighbour Egypt, which has kept its frontier with Gaza largely closed and accused the group in the past of aiding Islamist militants in Egypt's Sinai desert, something Hamas denies.