Palestinians and Israelis are to lay down their arms in Gaza at 6 a.m. Sunday, after militant factions in the coastal strip agreed to stop all attacks on Israel and Israel reciprocated by pledging to end an extended offensive against rocket squads.

The truce announcement held out the promise of a possible resumption of long-stalled peace talks, and was a significant achievement for Palestinian President Mahmoud Abbas as he tries to put together a more moderate government to replace the one currently led by Islamic Hamas radicals.

The sides announced the impending truce after Abbas telephoned Israeli Prime Minister Ehud Olmert late Saturday to tell him he had arrived at an agreement with Palestinian factions to stop all violence from Gaza. Abbas asked that Israel, in turn, stop all military operations in Gaza and withdraw all its forces, and Olmert agreed, spokespeople for both leaders said.

Abbas spokesman Nabil Abu Rdeneh said from Gaza City that the president, Prime Minister Ismail Haniyeh of Hamas and all the Palestinian factions signed an agreement to reinstate a truce reached in Egypt in February 2005.

"There is a signed agreement between the president and Prime Minister (Ismail) Haniyeh and all the Palestinian factions to resort to the agreement of the factions in Cairo in 2005, including ceasing all the military activity from Gaza, starting from Sunday morning," Abu Rdeneh said. "The Israeli prime minister has agreed, and it is going to start tomorrow morning."

Abbas told Olmert that the factions had agreed to stop all violence from Gaza, including rocket fire and suicide bombings, starting at 6 a.m. Sunday, Israeli government spokeswoman Miri Eisin said.

He "asked that, in response, Israel stop all military operations in the Gaza Strip and withdraw all her forces," and Olmert responded favorably, Eisin said.

Militant factions said earlier denials of a cease-fire agreement were a product of turf battles.

The agreement Abbas wrested from the Palestinian armed groups promises to end a 5-month-old military campaign Israeli launched in Gaza less than a year after evacuating the territory. Israeli forces originally entered Gaza in late June in an effort to win the release of a soldier captured in a June 25 cross-border raid by Hamas-linked militants.

But Israel soon widened its operations to target militants who had intensified their near-daily rocket attacks on communities in southern Israel. Despite international criticism over Palestinian civilian deaths, Olmert had pledged earlier this month to continue the offensive until Palestinian rocket attacks from Gaza significantly decreased.

Instead, the rocket fire in November has more than doubled from October.

The capture of the Cpl. Gilad Shalit and the subsequent Israeli offensive cut short efforts by Olmert and Abbas to restart peace talks that broke down six years ago. A truce could help to create the momentum to get talks moving.

"We welcome the announcement and see this as a positive step forward," White House spokesman Alex Conant said Saturday evening in Washington. "We hope it leads to less violence for the Israeli and Palestinian people."

A cease-fire in Gaza was part of a broad package that Abbas, a moderate from the Fatah Party, is seeking in an effort to persuade the West and Israel to lift crushing economic sanctions. The centerpiece of that package is the formation of a new government less inimical to Israel than Hamas', which drew the sanctions for refusing to bow to international demands to recognize the Jewish state. Another major element is the release of the captured Israeli soldier in exchange for Palestinians Israel holds.

Hamas' supreme leader, Khaled Mashaal, was in Cairo to discuss both issues with Egytian mediators, but there was no word of a breakthrough.

Earlier Saturday, Mashaal said his group was willing to give peace negotiations with Israel six months to reach an agreement for a Palestinian state in Gaza and the West Bank, but threatened a new armed uprising if the talks failed.

The double-edged comments were his strongest confirmation that the Islamic militant group would allow Abbas to try to negotiate with Israel. But it was also the first time he has set a deadline with an explicit threat of a new uprising.

Israel had no immediate comment on Mashaal's proposal.