GAZA CITY, Gaza Strip (AP) — The leader of Hamas said on Thursday that his group has reached an agreement with the rival Fatah party of Palestinian President Mahmoud Abbas after Egyptian-brokered talks about the terms of control of the Gaza Strip.

Ismail Haniyeh said in a statement that details would be announced later in the day in Cairo. The development follows two days of Hamas-Fatah talks in Cairo under what Haniyeh called “generous Egyptian auspices.”

The talks marked the latest in a series of attempts to end a decade-long Palestinian territorial, political and ideological split that has crippled Palestinian statehood aspirations.

In 2007, a year after winning Palestinian parliament elections, the Islamic militant Hamas evicted Abbas’ Western-backed Palestinian Authority from Gaza. Abbas was left with autonomous enclaves in the Israeli-occupied West Bank.

Over the past decade, each side deepened its control over its territory, making it increasingly difficult to forge compromises.

Abbas has insisted that he will only reassume control of Gaza if Hamas hands over power. Hamas, in turn, has said that it will not disarm — even if it is willing to give Abbas control of the Gaza government.

Sticking points in past and current talks included control over the arsenal of Hamas’ armed wing, the fate of thousands of Hamas’ public servants, arrangements for Gaza’s border crossings and a restructuring of the security forces.

The union representing Hamas-allied civil servants in Gaza said Thursday that as part of an emerging deal, a committee would discuss over the next four months how they would be integrated into a new government.

In the current context, both sides might be more willing to reach a deal.

Struggling with the fallout from an Israeli-Egyptian border blockade since 2007, Hamas has found it increasingly difficult to govern or provide basic services to Gaza’s 2 million residents.

The 82-year-old Abbas, meanwhile, might be thinking about his legacy. The political split has been a major stain on his rule, particularly at a time when attempts to negotiate the terms of Palestinian statehood with Israel seem to be going nowhere.

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. The group refuses to renounce violence or recognize Israel.