CAIRO — Rival Palestinian factions Hamas and Fatah reached a “comprehensive” agreement Thursday for the return of their unity government in Gaza after two days of talks in Cairo, negotiators from both sides said.

“Fatah and Hamas have reached a comprehensive agreement for the unity government to return to the Gaza Strip,” Jibril Rajoub of Fatah told AFP.

Senior Hamas official Moussa Abu Marzouk and Fatah’s head of delegation, Azam al-Ahmad, confirmed that an agreement had been reached.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

Meanwhile, a senior Palestinian official said President Mahmoud Abbas’s government, which runs the West Bank, will press forward with a United Nations bid to set a deadline for Israel to end its occupation of lands captured in the 1967 war, after efforts to enlist American support for the effort ran aground.

“Work with the Americans about the possibility of joint action in the Security Council has reached an impasse,” said chief Palestinian negotiator Saeb Erekat, adding that he expects the Palestinian delegation in New York to propose a UN resolution on the issue within three weeks.

The purpose of the resolution is to set the groundwork for the formal establishment of a Palestinian state. Erekat said that a provisional draft would be ready on Friday, and that consultations with Arab and Islamic countries, the European Union, Russia, China and a number of non-aligned nations could probably be completed in two to three weeks.

Erekat said that US Secretary of State John Kerry had ruled out the possibility of American support for the U.N. route, insisting that the world body was not the proper forum for negotiating an end to the Palestinian-Israeli conflict.

In light of of continued Israeli settlement in the West Bank, he said, the American position was not tenable.

“Hiding behind the call for the resumption of negotiations … is no longer viable in front of an Israeli government that uses the peace process as a cover for the continuation of settlements and imposing facts on the ground to destroy the two-state solution,” Erekat said.

The deal struck Thursday behind closed doors in the Egyptian capital is the sixth official accord between the two groups, but with major issues not yet resolved — including salaries for Hamas employees in Gaza and control over the coastal territory’s security forces — concerns over possible new confrontations between the factions remain.

Outlining the deal’s provisions, Abu Marzouk said the new unity government will start making some payments to government officials in Gaza, though the question of full salaries has been left to future negotiation.

Also, he said, the government will jointly man border crossing points with Israel and Egypt and jointly administer a hoped-for Gaza reconstruction process, funded by donations from European and other western countries.

“We have set the reconstruction as high priority,” Abu Marzouk said.

Hamas and Fatah have a long history of dashed hopes. The Palestinian rivals had set up a unity government of independents in June but it never took hold, with PA President Abbas accusing Hamas of running a “parallel” administration as de facto ruler in the Gaza Strip.

Hamas in turn accuses Abbas’s Palestinian Authority, headquartered in Ramallah, of not paying its 45,000 employees in Gaza. The tensions appear to have spiked in recent weeks over Fatah claims that Hamas’s conduct of the recent Hamas-Israel war led to unacceptably high losses of life and damage to property.

Azzam al-Ahmed, an Abbas aide, said Hamas, Fatah and other Palestinian factions have now formed a committee to look into a number of pressing issues in Gaza, including the salary question. “The national committee will be able to sort this out,” he said.

Abu Marzouk said this week’s meetings yielded broad agreement on creating mechanisms to permit the import of construction materials into Gaza to let rebuilding efforts go ahead.

Concerned that building materials like cement and some metals could be used by Hamas to manufacture weapons, Israel has demanded that foreign governments and international organizations involved in the reconstruction provide clear-cut safeguards against the materials’ diversion for weapons-making.

Abu Marzouk appeared to be sensitive to this concern.

“What we did now is facilitating … and providing all mechanisms to help donors, and give them assurances about the process from the beginning to the end,” he said.

The two-day talks, which began on Wednesday, come after a joint Palestinian delegation and Israel agreed to resume separate indirect talks in late October to thrash out a lasting truce after this summer’s 50-day Gaza war between Hamas and Israel.

Officials said the two Palestinian factions also agreed that the Palestinian Authority will manage Gaza crossings to allow construction material and humanitarian aid to pass ahead of an international donor conference in October.

The talks between the two sides were crucial for internal Palestinian divisions to be set aside and to agree on a unified strategy during talks with Israeli negotiators in October.

Under Egyptian mediation, Israel and the Palestinians agreed on August 26 to a ceasefire that ended the July-August war which claimed the lives of over 2,000 Palestinians — half of them combatants, Israel says — and 72 Israelis, including a four-year-old child.

The conflict ended with an agreement to hold future talks on Palestinian demands to end an eight-year blockade of Gaza — imposed by Israel and Egypt mainly to prevent weapons smuggling –and exchange prisoners in Israeli jails for the remains of two Israeli soldiers killed in Gaza.