JERUSALEM — Rival Palestinian political factions on Wednesday announced a surprise reconciliation deal and plans for a unified government, upending US-backed peace talks with Israel just days before a deadline to end or extend the most substantive negotiations in years.
The deal would reunite the Fatah faction in the West Bank, which has been negotiating with Israel, with the Hamas group that refuses to recognize Israel’s legitimacy. Hamas is blamed for allowing near-daily rocket attacks on Israel from the Gaza Strip territory it controls.
Israel quickly condemned the plan and canceled a negotiating session with representatives of Palestinian Authority President Mahmoud Abbas planned for Wednesday.
‘‘This evening, as peace talks were about to take place, Abbas chose Hamas and not peace,’’ read a statement released by Israeli Prime Minister Benjamin Netanyahu’s office. ‘‘Whoever chooses Hamas does not want peace.’’
The statement called Hamas ‘‘a murderous terror organization that calls for the destruction of Israel.’’
The United States, apparently taken unaware, called the development disappointing and a serious hurdle to nine-month-old peace talks that have been the signature diplomatic effort of Secretary of State John Kerry.
‘‘It’s hard to see how Israel can be expected to negotiate with a government that does not believe in its right to exist,’’ State Department spokeswoman Jen Psaki said.
Fatah and Hamas have announced similar accords, only to see them fall apart.
The accord announced Wednesday gives Abbas five weeks to form a unity government based on conditions laid out in previous agreements and to set in motion plans for parliamentary and presidential elections.
At a news conference in the Gaza Strip, Hamas leader Ismail Haniyeh and senior Fatah official Azzam al-Ahmad said the two factions had fulfilled a ‘‘national responsibility’’ to reach an agreement.
Fatah is the dominant party in the Palestine Liberation Organization and governs the much larger Palestinian territory in the West Bank under Israeli occupation. Fatah broke ties with Hamas, an Islamist militant movement, after it seized the smaller Gaza territory in 2007. Hamas had swept elections there in 2006, following Israel’s unilateral withdrawal of forces and settlers.
Both the United States and Israel have branded Hamas a terrorist organization and have no direct relations with the group.
The United States is watching developments closely, Psaki said, and is not yet writing off intensive efforts to help Israel and the Palestinians frame a peace deal.
‘‘This could seriously complicate our efforts — not just our efforts, but the efforts between the parties more importantly to extend the negotiations,’’ Psaki said.
Kerry worked for the first half of 2013 to restart peace talks that had been largely shelved for the previous five years. When talks did resume last summer, he set a deadline of the end of April for an outline deal. That deadline had slipped, and efforts over the past several weeks were on keeping negotiations going. Kerry insists the talks have been detailed and meaningful, despite complaints on both sides. All talks have been at the relatively low level of negotiators, with no direct meeting between Netanyahu and Abbas.
‘‘The ball is in the Palestinian court’’ to explain how the proposed unity government would work and what effect it would have on talks with Israel, Psaki said.
Abbas has said he wants a peace deal and has pledged to bargain with Israel in good faith. Netanyahu likewise has said he wants a deal.
Dore Gold, special adviser to Netanyahu, said the announcement reveals how Abbas really sees future relations with Israel.
‘‘Unless Abbas pulls back from his embrace of Hamas it’s impossible to imagine these peace talks will work,’’ Gold said.
Saeb Erekat, the chief Palestinian negotiator, suggested Israel is being hypocritical.
‘‘Mr. Netanyahu and his government were using Palestinian division as an excuse not to make peace. Now they want to use Palestinian reconciliation as an excuse for the same purpose,’’ Erekat said. ‘‘This is utterly absurd. The only logical conclusion is that Netanyahu’s government does not want peace.’’
Shimrit Meir, founding editor of Arabic media outlet Al Masdar, said that the real test would be if Abbas would visit Gaza in the coming weeks.
‘‘This is not the first ‘breakthrough’ between the two sides since 2007; we have been in this situation before,’’ she said, adding, however, that there were some indications that this agreement could hold.
This time, she said, both sides are in difficult positions. Hamas has lost its support from Egypt and Iran, and Abbas is facing difficult challenges in reaching a peace agreement with the Israelis.
As the news conference in Gaza City was taking place, the Israeli military said that its jets had targeted sites in the seaside enclave. Palestinian media reported that seven people were injured.