GAZA CITY, Gaza Strip — Rival Palestinian factions Hamas and Fatah agreed Wednesday to form a unity government and hold new elections — a potentially historic step toward mending the rift that has split their people between two sets of rulers for seven years.
Following the announcement of the deal, hundreds of people took to the streets in Gaza to celebrate. Crowds hoisted Palestinian flags and posters.
"I hope it will be real this time," said Asma Radwan, a 33-year-old schoolteacher who came with her two young sons. "I came to say 'thank you' to the leaders. But don't disappoint us like the past. Seven years of division is enough."
It remained unclear how the plan would succeed where past attempts have repeatedly failed. It also added new complications to U.S. efforts to broker a peace deal between Israel and the Palestinians. Both the U.S. and Israel condemned the agreement.
In an initial response, the office of Israeli Prime Minister Benjamin Netanyahu canceled a planned meeting for Wednesday evening between Israeli and Palestinian peace negotiators.
Israel and the West consider Hamas a terrorist group. Hamas, which is sworn to Israel's destruction, has killed hundreds of Israelis in bombings and shootings over the past two decades.
Abbas "needs to choose between peace with Israel and an agreement with Hamas, a murderous terror organization that calls for the destruction of Israel," Netanyahu said.
In a statement, Abbas said "there is no contradiction" between reconciliation and his efforts to reach a "just peace" with Israel. He said Wednesday's deal would help Palestinian negotiators achieve a two-state solution.
Hamas seized Gaza from Abbas' forces in 2007, leaving him with only parts of the West Bank. Both sides have become entrenched in their territories, setting up separate governments and their own security forces.
The division has been a major obstacle to Abbas' goal of establishing an independent state in the West Bank and Gaza, with east Jerusalem as the capital. Israel captured all three areas in 1967. The split is also seen by many everyday Palestinians as a tragic mistake.
The two sides planned to form an interim government within five weeks. Presidential and parliamentary elections should be held no sooner than six months after the government is formed, said Ismail Haniyeh, prime minister of the Hamas government.
Similar agreements have been reached in principle in the past. But they were never implemented due to deep differences and an unwillingness to cede power.
Hamas, for instance, employs tens of thousands of civil servants and security forces in Gaza, and it is in no rush to relinquish control to a centralized government led by Abbas. The group has also seen its popularity plummet, making elections risky.
Abbas, meanwhile, could face international isolation and the loss of hundreds of millions of dollars in aid if he joins forces with Hamas. International donors withheld aid during a short-lived Palestinian unity government elected in 2006 and 2007, before the Hamas takeover, due to concerns that the money would be diverted to Hamas.
A key test will be whether the sides can agree soon on a caretaker government of apolitical technocrats. Squabbling over the government's composition has derailed past reconciliation attempts.
Still, changes in the region have given each side an incentive to try again, even if a full agreement seems unlikely.
Hamas has been weakened since a military coup in neighboring Egypt last July. The coup toppled the Islamist government of President Mohammed Morsi, Hamas' most important ally. Egypt's new military government has cracked down hard on Hamas, closing a system of smuggling tunnels that provided Hamas with a key conduit for weapons and tax revenue. The Egyptian pressure and a longstanding Israeli blockade have plunged Hamas into the worst financial crisis of its rule, making it difficult to pay the salaries of its employees and sinking its public standing.
Abbas, on the other hand, has achieved little during nine months of U.S.-brokered peace talks with Israel. Those talks are set to expire next Tuesday, though the sides have been searching for a formula to extend the negotiations.
In Washington, State Department spokeswoman Jen Psaki said the U.S. was "disappointed and troubled" by the Palestinians' announcement.
"It is hard to see how Israel can be expected to negotiate with a government that does not believe in its right to exist," Psaki said, referring to Hamas.
Palestinian analyst Nasim Zubaidi described Wednesday's agreement as a "marriage of convenience." He said both sides were "forced" into each other's arms, with Abbas hurt by the failure of peace efforts and Hamas' financial struggles.
Even so, he said, it was far from clear whether they would go through with the deal. "Both have signed, but they are using the tactic of 'let's wait and see.' Abbas will wait and see how things will go in the peace talks, and Hamas will see how it goes with their problems in Gaza."
Ultimately, it will be difficult to merge two rival ideologies and two rival security forces into one, Zubaidi said.
Wednesday's reconciliation deal is the latest attempt by Abbas to send a message to Israel that he has other alternatives. Abbas has also hinted in recent days that he might dismantle his self-rule government and saddle Israel with the huge financial burden of taking care of more than 4 million Palestinians in occupied lands.
These latest moves may be aimed at building leverage to pressure Israel to agree to favorable terms for continued negotiations. But they could also signal a new approach if the talks really do collapse.
Yet Abbas' decision also risks triggering a tough Israeli response. Hardline Israeli leaders quickly condemned the unity deal, and several called for Netanyahu to halt the peace efforts.
Israel's Channel 10 TV said Netanyahu would meet with his Security Cabinet on Thursday to discuss a response. It also said that future meetings between peace negotiators were in doubt.
"The Palestinian Authority has become the biggest terror body in the world," said Naftali Bennett, head of the hardline Jewish Home Party. "Israel needs to be clear," he added. "No talks with murderers."
Adding to the tensions, an Israeli airstrike hit the northern Gaza Strip, missing its target but wounding at least three bystanders, Palestinian officials said.
Medical official Ashraf al-Kidreh says the airstrike targeted two men riding a motorcycle, but that the missile missed its target and wounded a 50-year-old man and two daughters.
The Israeli military confirmed the failed airstrike, saying "a hit was not identified."
Gaza militants fired a barrage of rockets at southern Israel soon afterward, the Israeli military said. There were no immediate reports of injuries or damage.
Associated Press writers Mohammed Daraghmeh in Ramallah, West Bank, and Ian Deitch in Jerusalem contributed to this report.