The Palestinian militant group Hamas says it has agreed to enter talks with the rival Fatah party in an effort to end their longstanding and often bloody dispute.

Hamas on September 17 said it also agreed to dissolve the Gaza administrative committee, hold general elections, and allow the reconciliation government to carry out its duties in the strip of territory it rules.

Fatah controls Palestinian President Mahmud Abbas’ Western-backed Palestine Authority (PA), which fought a war with Hamas over Gaza in 2007, leading to Hamas taking over the territory.

Many attempts to end the dispute between Hamas and Fatah and form a unity government in Gaza and the West Bank have failed.

Hamas’ announcement came out of Cairo, where the Egyptian government has been attempting to push a deal brokered in 2011 to form an interim government before elections are held.

The PA cut funding for electricity to Gaza and slashed the salaries of thousands of civil servants in an effort to force Hamas to disband the controversial administrative committee it formed to run the territory in defiance of the PA.

In its announcement, Hamas offered to dissolve the committee and agreed to form a Palestinian consensus government that would organize elections and be in charge of Gaza and the West Bank.