(CNN) -- Rival Palestinian factions Hamas and Fatah announced Wednesday they've agreed to reconcile -- a development that could see the Palestinian territories under a unified leadership for the first time in years.
The sides, wrapping up two days of talks in Hamas-run Gaza, announced they will begin discussions to form a unity government. An interim government could be finalized in the next five weeks, with elections possible by early 2015, Fatah spokesman Fayez Abu Eitta said.
Wednesday's announcement comes amid a deterioration of U.S.-brokered peace talks between the Palestinian Authority and Israel -- talks that Hamas, a militant Islamic group that hasn't recognized Israel, opposed.
Israeli Prime Minister Benjamin Netanyahu reacted strongly to the announcement. Israel and several other countries consider Hamas to be a terrorist organization.
"(Palestinian Authority President Mahmoud Abbas) needs to choose between peace with Israel and an agreement with Hamas," Netanyahu said in a statement released Wednesday by his media adviser. "... Whoever chooses Hamas does not not want peace."
After the reconciliation was announced, Netanyahu's office said Israel canceled peace negotiations that were scheduled to take place Wednesday night.
Israel and the Palestinian Authority face an April 29 deadline to agree on a framework for a comprehensive peace treaty, but the sides appear far apart.
The Hamas-Fatah deal also came on an afternoon that an Israeli airstrike in the northern Gaza strip injured 12 people, including children and teenagers, according to Ashraf Al Qidra, a spokesman for the health ministry in Gaza.
Al Qidra said it was a drone strike. The Israeli military said it conducted an airstrike in a counter-terror operation, but provided no other details.
Mustafa Barghouti, a Palestinian lawmaker involved in the Hamas-Fatah talks, hailed what he called the "end to the division between the Palestinian people."
"Palestinians are in a unified camp, and Israel cannot claim that Palestinians cannot negotiate on behalf of all Palestinians," Barghouti told CNN on Wednesday.
The Palestinian territories of Gaza and the West Bank have been run separately for seven years. The split began taking shape in 2006 when Hamas, participating in Palestinian polls for the first time, won a majority in the Palestinian parliament.
The Fatah-dominated Palestinian Authority formed a coalition government with Hamas that year, with Abbas retaining the presidency and Hamas member Ismail Haniya becoming prime minister. But when Abbas dissolved the government in 2007, Hamas seized control of Gaza, and Haniya became Gaza's de facto political leader.
The West for years has shown support to Fatah and warned it not to join hands with militant Hamas, which several countries have deemed a terrorist organization.
Reconciliation talks started Tuesday evening, after Abbas sent a Fatah delegation to meet with Hamas representatives in Gaza.
It wasn't immediately clear who would lead, though Abbas, whose Fatah group runs the West Bank, is a possibility for premier, Abu Eitta said.
CNN's Talal Abu Rahma Jennifer Deaton and Michael Schwartz contributed to this report.