A seven-year-old rift between rival Palestinian factions seemingly ended Wednesday as officials from the Palestine Liberation Organization and Hamas agreed to form a unity government and call for new elections.

Members of both organizations announced the deal at a press conference in Gaza following two days of negotiations.

The news came as Israeli jets reportedly targeted Gaza from the air.

Medical official Ashraf al-Kidreh said the strike targeted two men riding a motorcycle, but that the missile missed its target and wounded three bystanders. Other media reported higher injury tolls.

The Israeli military said it carried out a joint anti-terror operation with the Shin Bet security service but a “hit was not identified.” It was not clear who they were targeting.

PLO official Azzam al-Ahmad, a senior figure in Palestinian Authority President Mahmoud Abbas’s Fatah party, said he hoped the deal would be “a true beginning and a true partnership.”

“We have made this Palestinian dream a reality whereby the rift has come to an end and we are reunited,” he said

The deal calls for a unity government to be formed within five weeks and for presidential, parliamentary and provincial elections to be called within six months of the coalition taking form, Hamas prime minister Ismail Haniyeh said.

“This has become a national responsibility and a duty,” he said, referring to the reconciliation.

The sides will also exchange prisoners as part of the deal.

The news was met with celebrations on the streets in Gaza, though some analysts were skeptical the deal would hold any better than previous attempts.

Palestinians shout slogans and hold a portrait of Palestinian president Mahmoud Abbas as they take part in a demonstration in support of a new attempt to reconcile Hamas and the PLO in Gaza City Wednesday. (photo credit: AFP/SAID KHATIB)

Palestinians shout slogans and hold a portrait of Palestinian president Mahmoud Abbas as they take part in a demonstration in support of a new attempt to reconcile Hamas and the PLO in Gaza City Wednesday. (photo credit: AFP/SAID KHATIB)

Hamas and the Fatah-dominated PLO have been at loggerheads since 2007, when the Islamic militant Hamas organization seized Gaza from Abbas in 2007, leaving him with only parts of the West Bank. Both sides have become entrenched in their territories, with Hamas using Gaza to fire thousands of rockets at Israel over the years, drawing two large scale Israeli offensives.

Israeli politicians slammed the agreement as putting Abbas, seen as a moderate, on the same footing as the hard-line Hamas terror group.

“From now on every Kassam [rocket] is sent from Abbas,” MK Ayelet Shaked from the hawkish Jewish Home party said.

Earlier in the day, Prime Minister Benjamin Netanyahu said Abbas had to choose between peace with Israel and peace with Hamas.

“Instead of moving into peace with Israel, he’s moving into peace with Hamas,” Netanyahu said.

Foreign Minister Avigdor Liberman said the signing of a unity agreement would spell the end of already teetering peace talks.

“The signing of an agreement for a unity government between Fatah and Hamas is a signature on the end of negotiations between Israel and the Palestinian Authority,” he said.

It is not the first time that a national unity government has been announced by the rival factions, and on several previous occasions attempts to form an administration have collapsed.

Fatah, the PLO’s main component, and Hamas signed a reconciliation accord in Cairo in 2011 aimed at ending the political divide between Gaza and the Palestinian Authority-ruled West Bank. But deadlines have come and gone without any progress in implementing provisions of the accord.

“People have heard the same thing over and over again and each time the agreement had been broken by either Fatah or Hamas,” said Samir Awad, politics professor at Birzeit University in the West Bank.

Analyst Hani al-Masri said he believed the reconciliation could collapse at any moment and had “hardly any substance on the ground.”

“Reconciliation (between the Palestinian factions) and negotiations (with Israel) are now just tactics — each side has its own calculations.”

Ahmad, however, called on Palestinians to give the agreement a chance to succeed.

“I appeal to all media outlets to play a positivist role necessary to protecting this agreement,” he said.

AP and AFP contributed to this report.