Hamas ceded power in the Gaza Strip to the Palestinian Authority’s Fatah-led government Thursday, nearly three months after the start of one of the deadliest conflicts between the militant Palestinian faction and Israel. Although the agreement between the opposing Palestinian factions does not come as a surprise, experts said it underlines how the war weakened an already declining Hamas.  

“Hamas was in tough straits before the war and now even after the war,” said Neri Zilber, a journalist and visiting scholar at the Washington Institute. “They’re trying to figure out how to move forward.”

The agreement will require both factions to accept a settlement with Israel along the 1967 borders and could lay the groundwork for a lasting, unified Palestinian government controlling both Gaza and the West Bank. The new government in the Gaza Strip, which will include both Hamas and Fatah members, will also make some payments to Hamas officials who had not been receiving any salary and will be responsible for guarding all of Gaza’s border crossings. This is “effective immediately,” Fatah negotiator Hassin Alsheikh told the Israeli newspaper Haaretz. The Palestinian Authority will also begin rebuilding the Strip, after the destruction wrought by the conflict with Israel. 

An estimated 200,000 Gazans are still displaced nearly a month after Israel and Hamas reached a cease-fire agreement, and more than 108,000 people are likely to remain homeless, according to the U.N.’s initial assessment. At least 44,300 housing units were damaged or destroyed, and at least 18,000 are currently uninhabitable. More than 2,100 Palestinians and 72 Israelis were killed in the 50-day conflict.  Earlier this month, the United Nations and the Palestinian government called for $550 million in international donations to support Gazans affected by the war.

"We and Fatah have reached a deal today on reconciliation," Hamas' deputy leader Mussa Abu Marzouk said Thursday. "The deal states that a (unity) government can officially assume control over government institutions in Gaza."

For Hamas, this deal was the best possible course, experts said. Giving up power was the only way to repair the extensive damage in Gaza and maintain some kind of political foothold in Palestine.

“They gave up control in Gaza for perhaps more political advantages in the West Bank,” said Zilber, adding that it was “a good step for them to agree to this and declare this publicly.”

Thursday’s deal between the rival factions comes just over a week after Palestinian Authority President Mahmoud Abbas reached an agreement with Israel and the United Nations that would allow necessary construction materials to enter the Strip. Hamas was reportedly not involved in this arrangement.

The Palestinian Authority is a result of the 1993 Oslo Accords that called for an almost total removal of Israeli forces from the West Bank and the Gaza Strip. The two territories were then grouped into one political unit, governed by Fatah. In 2006, Hamas won the Palestinian legislative elections but by June 2007, Fatah had ousted the Hamas government in the West Bank. Hamas remained in control of Gaza, effectively splitting the territories. The two refused to recognize each other as legitimate governments until April 2014.