* Hamas and Islamic Jihad at Cairo talks, Israel absent
* All accept three-day ceasefire from 0500 GMT Tuesday
* Truce 'could pave way for more comprehensive talks' (Releads with Egyptian-brokered ceasefire)
By Yasmine Saleh and Lin Noueihed
CAIRO, Aug 4 (Reuters) - Israel and the Palestinian factions, including Gaza's ruling Islamist Hamas movement, have accepted an Egyptian proposal to cease fire from 0500 GMT on Aug. 5 for at least three days.
Egypt also invited Israel and the Palestinians to attend high-level talks in Cairo aimed at securing a longer-term deal to end a war that has claimed nearly 2,000 lives.
"We hope this will secure a permanent ceasefire and restore stability," the Egyptian Foreign Ministry said in a statement.
Israel began aerial and naval bombardment of Gaza on July 8 after what it said was a surge in cross-border rocket salvoes by Hamas and others, and later sent in ground forces.
Gaza officials say 1,834 Palestinians, most of them civilians, have been killed. Israel has confirmed that 64 of its soldiers have died in combat, while Palestinian shelling has killed three civilians in Israel.
Palestinian groups, including envoys of Hamas and Islamic Jihad, were already in Cairo, where they had met the head of Egyptian intelligence on Monday to present their key demands for ending the violence, which has displaced more than one quarter of Gaza's 1.8 million people and seen 3,000 homes destroyed.
Immediately after the meeting, Egypt presented Israel with the demands, which included a ceasefire, the withdrawal of Israeli forces from Gaza, an end to the blockade of the impoverished enclave and the release of some prisoners.
An Israeli official who declined to be named appeared to suggest that Israel was willing to pull its forces out of Gaza as part of a ceasefire.
"We agree to begin implementing the Egyptian initiative. If the ceasefire is upheld there will be no need for any presence of (Israeli) forces in the Gaza Strip," he said.
Israel has already begun to wind down its offensive, saying the army has completed the main objective of the ground assault, the destruction of cross-border infiltration tunnels from Gaza.
It had declined earlier in the week to send a delegation to Egypt for truce talks, raising doubts that a deal could be done.
A Palestinian official affiliated with one of the militant factions said a temporary ceasefire would help open the door to more comprehensive negotiations.
"Should Israel agree to the 72-hour ceasefire, Egypt would invite Israel to send a delegation to Cairo to conduct indirect negotiations with the Palestinian delegation over all issues," he said.
Egypt has positioned itself as a mediator in successive Gaza conflicts but, like Israel, it opposes Hamas, and it has struggled to seal a deal to end the latest fighting.
Media speculation that U.S. Deputy Secretary of State Bill Burns would fly to Egypt to participate in indirect truce talks had not been borne out by Monday.
A U.S. embassy spokesman declined to say if or when Burns might arrive. A U.S. official in Washington said acting special envoy for Israeli-Palestinian negotiations Frank Lowenstein was on his way back from Cairo, suggesting the United States was following the initiative closely.
Last Friday, a U.S.- and U.N.-brokered ceasefire broke down within two hours, with Israel and Hamas trading blame.
A Hamas source in the Qatari capital Doha said before Egypt announced its plan that Hamas would not lay down arms unless Palestinian conditions were met.
"I must stress that the Palestinian resistance will continue if the conditions are not met," he said. "Our success politically will only happen if our people continue to resist - and they will resist."
Qatar, a backer of Hamas, has stayed out of the Egypt talks, but has continued consultations with Turkey and U.S. Secretary of State John Kerry aimed at finding an end to the crisis should Egypt fail, a Gulf source and the Hamas official in Doha said.
(Additional reporting by Nidal al-Mughrabi in Gaza, Ori Lewis in Jerusalem and Amena Bakr in Doha; Editing by Kevin Liffey)
Our Standards: The Thomson Reuters Trust Principles.