JERUSALEM - Rival Palestinian political factions on Wednesday announced a surprise reconciliation deal and plans for a unified government, upending U.S.-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, which 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 evening.

"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 a serious hurdle to nine-month-old peace talks that have been the signature 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," the State Department's Jen Psaki said.

Fatah and Hamas have announced similar accords previously, only to see them fall apart.

The accord 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 accord.

Fatah is the dominant party in the PLO and governs the much larger Palestinian territory in the West Bank. Fatah broke ties with Hamas after it seized control of the smaller Gaza territory in 2007. Hamas had swept elections there in 2006, after 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 reach a peace 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," he said. "Now they want to use Palestinian reconciliation as an excuse for the same purpose."