By HAMZA HENDAWI and FARES AKRAM, Associated Press

CAIRO (AP) — Palestinian rivals Fatah and Hamas reached a preliminary agreement Thursday that could return the Gaza Strip to President Mahmoud Abbas' control and ease a decade-old Israeli-Egyptian blockade of the coastal territory, but past attempts at unity have foundered on key issues that remain unresolved.

The deal was announced at a news conference in Cairo, where negotiators have been meeting, and Hamas leader Ismail Haniyeh said it was reached under "generous Egyptian auspices," without elaborating. Egypt has been eager to show progress in unity talks, and both Palestinian factions face pressure to resolve their differences.

The sides have tried, and failed, to reach reconciliation several times before, but even with such skepticism Palestinians celebrated Thursday's announcement.

"This is the dream and the ambition of every patriotic and honorable Palestinian, to reach unification," said Ramallah resident Jawad Abu Shaikha.

In Gaza, residents took to the streets to rejoice. "I hope there will be implementation on the ground for the issues agreed upon, because we are truly tired from the division and poverty," said Waed Mesameh.

A senior Palestinian official said Abbas, the leader of Fatah, might visit Gaza in the coming weeks, depending on the successful implementation of the agreement. The official spoke on condition of anonymity ahead of the formal announcement.

The Western-backed Abbas hasn't set foot in Gaza since 2007, when the Islamic militant Hamas, his main ideological rival, seized the territory after days of factional street battles. The Hamas takeover left Abbas in control of autonomous enclaves in the Israeli-occupied West Bank.

Over the past decade, each side deepened control over its territory, making it increasingly difficult to forge compromises, and repeated attempts at reconciliation failed.

Under the emerging agreement, Hamas would hand over responsibilities of governing Gaza to the West Bank-based government of Prime Minister Rami Hamdallah.

Azzam al-Ahmad, head of the Fatah delegation, said Abbas' Palestinian Authority would assume control of the crossing points between Gaza and Israel by Nov. 1. He said Abbas' presidential guard would assume control of the Rafah crossing between Gaza and Egypt, but did not specify a timetable.

"The Rafah crossing needs some measures to improve and renovate the buildings," al-Ahmad said during the announcement of the deal.

A permanent opening of the Rafah crossing would mean an end to the crippling Israeli and Egyptian blockade imposed on Gaza after the Hamas takeover, which prevents free trade and bars the vast majority of Gaza's 2 million people from leaving the territory.

Israel, which has fought three wars with Hamas since the takeover, has been cool to the idea of Fatah partnering with Hamas, which it along with most of the West considers to be a terrorist group. It also fears that opening Gaza's borders would help Hamas expand its arsenal and rebuild its military infrastructure.

Prime Minister Benjamin Netanyahu said Hamas is required to recognize Israel, cease its militant activities, release Israeli hostages it holds and abide by international agreements, demands the Islamic militant group has always rejected.

"Israel objects to a reconciliation that does not include these elements," he said in a statement. "So long as Hamas does not disarm and continues to call for the destruction of Israel, Israel sees it as responsible for all terror emanating from Gaza."

Only one of Gaza's four commercial crossings to Israel, Kerem Shalom, is currently operating. A small number of people, mainly medical patients, business people and aid workers, use the Erez crossing to enter Israel, usually bound for the West Bank.

Officials close to the talks said the sides agreed to set up committees to work out the outstanding details. In the past, such mechanisms quickly led to deadlock.

One committee would have four months to determine who among thousands of Hamas civil servants would be able to join the new government. Another committee would merge 3,000 Palestinian Authority loyalists into Gaza's Hamas-run police force.

Saleh al-Arouri, the head of the Hamas delegation in Cairo, said "we in Hamas are determined, serious and sincere this time and every time to end the division."

"We have adopted the strategy of one step at a time so that the reconciliation will succeed," he added.

Palestinian political analyst Ghassan Khatib said just reaching an agreement was "not good enough" and it was too early to judge the chances of implementation. "I don't think that they have a chance of success when it comes to security and political issues," he warned.

A major sticking point has been the Hamas military wing and its weapons, which Hamas has said are not up for discussion. Hamas officials have assured the Fatah negotiators that the military wing would maintain a low profile as part of any deal. It's not clear if this will satisfy Abbas, or if the dispute will re-emerge later on.

Various factions aim to meet next month to discuss other issues, such as holding long-overdue parliamentary and presidential elections.

Struggling with the fallout from the border blockade, Hamas has found it increasingly difficult to govern or provide basic services, such as electricity. The 82-year-old Abbas, meanwhile, might be thinking about his legacy. The political split has been a major stain on his rule, and there have been no negotiations with Israel since the peace process last collapsed in 2014.

Abbas heads the political camp that seeks to establish a state in the West Bank, Gaza and east Jerusalem, lands Israel captured in the 1967 war.

Hamas suggested in a new political manifesto earlier this year that it might consider a state in pre-1967 lines as an interim option, but also endorses an Islamic state in historic Palestine, including what is now Israel.

___

Akram reported from Gaza City, Gaza Strip. Associated Press writers Karin Laub and Mohammed Daraghmeh in Ramallah, West Bank, contributed to this report.