CAIRO/RAMALLAH (Reuters) - Hamas has agreed to dissolve the administration that runs Gaza, it said on Sunday, a major step towards handing control of the enclave to a Palestinian unity government after a decade of bitter rivalry with President Mahmoud Abbas.

The Islamist group, which has ruled Gaza since a brief Palestinian civil war in 2007, said it had taken “a courageous, serious and patriotic decision to dissolve the administrative committee” that runs the territory of 2 million people, and hand power to some form of unity government.

Reunification a decade after Hamas and Abbas’s secular 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.

Abbas welcomed Hamas’ move - a result of talks mediated by Egypt - and said he would convene the Palestinian leadership for discussions upon his return from New York where he was attending the U.N. General Assembly.

The development would “enable the formation of a national reconciliation government to work in the Gaza Strip and hold ... elections,” he said in a statement on official news agency WAFA.

Earlier, a Palestinian government spokesman said Cairo’s mediation had presented a “historic opportunity” that could help Palestinians toward full statehood.

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 Israel and Egypt.

FILE PHOTO: Palestinian President Mahmoud Abbas stands during a reception ceremony for Jordan's King Abdullah II in the West Bank city of Ramallah, August 7, 2017. REUTERS/Mohamad Torokman/File Photo

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, 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. 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 Abbas would be another step in Hamas’ diplomatic push to improve relations with its neighbor 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.

The United Nations’ envoy welcomed Sunday’s news.

“All parties must seize this opportunity to restore unity and open a new page for the Palestinian people,” U.N. Special Coordinator for the Middle East Peace Process Nickolay Mladenov said in a statement, adding that the U.N. was ready to assist the talks in order to alleviate hardship in Gaza.

Mladenov thanked Egypt for its “tireless efforts in creating this positive momentum.”

Some opinion polls have showed that if parliamentary elections were held now, Hamas would win both in Gaza and the Israeli-occupied West Bank, the seat of Abbas’s Palestinian Authority.

Abbas, 82, is 12 years into what was meant to be a four-year term as president and opinion polls show him to be unpopular. He has no clear successor and no new presidential election appears imminent.