Rival Palestinian factions Fatah and Hamas have announced a reconciliation deal, saying they will try to form a unity government in the coming weeks.
Hamas and Fatah split violently in 2007. Previous reconciliation agreements have never been implemented.
The deal comes amid troubled peace talks between Palestinian Authority President Mahmoud Abbas and Israel.
Following the announcement, Israel said it would not attend a negotiation session planned for Wednesday evening.
Prime Minister Benjamin Netanyahu earlier said Mr Abbas would have to choose between peace with Israel and peace with Hamas.
"You can have one but not the other. I hope he chooses peace; so far he hasn't done so," he warned.
Israel - along with the US and the EU - views the Islamist Hamas group as a terrorist organisation.
Palestinian officials responded by saying reconciliation was an internal matter and uniting Palestinian people would reinforce peace.
In a statement, Mr Abbas said there was "no incompatibility between reconciliation and the talks" and that they were committed to peace on the basis of a two-state solution.
US State Department spokeswoman Jen Psaki said Washington was "disappointed" by the announcement and warned it could seriously complicate peace efforts.
"It's hard to see how Israel can be expected to negotiate with a government that does not believe in its right to exist," she added.
Mr Abbas sent a delegation from his Fatah party to Gaza for reconciliation talks earlier this week.
The factions said they planned to form an interim unity government - headed by Mr Abbas - within five weeks and hold parliamentary elections within six months.
"This is the good news we tell our people," Ismail Haniya, prime minister of the Hamas-led government in Gaza, told reporters. "The era of division is over."
Senior Fatah official Azzam al-Ahmed said they had "agreed about everything we discussed, so we will forget what happened in the past".
The news brought thousands of Palestinians out on to the streets of Gaza City in celebration.
Ordinary Palestinians have long hoped for an end to the split between their political leaders but previous reconciliation deals in Doha and Cairo were never implemented, says the BBC's Yolande Knell in Jerusalem.
The agreement will strengthen the position of Mr Abbas - whose Fatah movement dominates the Palestinian Authority, which controls parts of the West Bank - and should also make Hamas feel less isolated as it continues to face border restrictions imposed by Israel and Egypt, our correspondent adds.
Fatah has historically been the dominant faction in the Palestinian nationalist movement, but Hamas won parliamentary elections in January 2006.
In early 2007, Fatah and Hamas agreed to form a coalition to end growing factional violence, but in June of that year Hamas seized Gaza by force and set up a rival government.
Shortly after Wednesday's reconciliation deal was announced, five people were injured in an Israeli air strike in northern Gaza, Palestinian medics said.
Israel said it had targeted militants preparing to fire rockets. On Monday, seven rockets were launched from the territory into southern Israel.