Rival Palestinian movements Fatah and Hamas have reached an initial agreement on ending a four-year-old rift that has left them divided between rival governments in the West Bank and the Gaza Strip.

Officials say the plan calls for the formation of a single caretaker government in the coming days, and preparations to hold presidential and legislative elections a year from now.

The officials, who spoke on condition of anonymity, say the agreement was reached through Egyptian mediation. A formal announcement is expected in Cairo soon.

"All points of differences" have been overcome, a Hamas spokesman was quoted as saying.

Despite the agreement, key questions remain about who will control the rival security forces. Disagreements over security control erupted into the June 2007 civil war that ended with Hamas consolidating control of Gaza.

Restoring unity between the two sides is seen as a necessary precursor to any rapprochement between Palestinians and the state of Israel.

Israeli Prime Minister Benjamin Netanyahu urged Palestinian President Mahmoud Abbas not to forge a reconciliation accord with Hamas.

"The Palestinian Authority must choose either peace with Israel or peace with Hamas. There is no possibility for peace with both," he told Reuters. "Hamas aspires to destroy Israel and fires rockets at our cities ... at our children."

With files from The Associated Press