Years of on-again, off-again talks between the two primary Palestinian factions, Hamas and Fatah, have ended with a formal accord to end years of hostility, and a goal to form a unity government in the Palestinian Authority within five weeks.

The final deal was signed in Gaza City today, after recent talks went deep into the night, and Hamas PM Ismail Haniyeh declared the “era of discord is ended.”

The most recent Palestinian elections came in 2006, when Hamas defeated Fatah by a surprisingly large margin, winning a significant number of seats in the legislative council.

Under pressure from the US, Fatah leader Mahmoud Abbas ultimately refused to recognize the results, and in the ensuing conflict Fatah took the West Bank, while Hamas took the Gaza Strip.

Since then, the two factions have remained at odds, and managed their respective territory independently. The lack of Palestinian unity has often been cited as a reason why they have not achieved statehood, though since the unity announcement today Israeli officials have suggested the deal, and not the lack of one, is the new excuse for statehood to be deferred.