Hamas has urged Palestinian negotiators not to extend the Gaza truce unless their demands are met as talks continue in the Egyptian capital Cairo.

The ceasefire in Gaza is in its third day, with Israel saying it is willing to extend it.

US President Barack Obama has said the people of Gaza need greater hope for the future, as he urged the extension of the 72-hour ceasefire.

"The US goal right now would be to make sure that the ceasefire holds, that Gaza can begin the process of rebuilding," Mr Obama told a news conference.

Similarly, he said, Israelis need to "feel confident that they're not going to have a repeat of the kind of rocket launches that we've seen over the last several weeks".

Mr Obama said the US was supporting ceasefire talks but added: "Long-term, there has to be a recognition that Gaza cannot sustain itself permanently closed off from the world."

Ordinary Palestinians living in the impoverished, blockaded Hamas-ruled territory need to "have some prospects for an opening of Gaza so that they do not feel walled off," Mr Obama said.

He reiterated his concern over civilians killed in the conflict, which left 1,886 Palestinians and 67 on the Israeli side dead.

His stance has drawn unusually sharp rebukes from some hardliners in Israel.

Mr Obama insisted he has "consistently supported Israel's right to defend itself" and repeatedly castigated Hamas, saying that the militant group has acted "extraordinarily irresponsibly" by launching rockets into Israel.

"I have no sympathy for Hamas. I have great sympathy for ordinary people who are struggling within Gaza," Mr Obama said.

Israel and Hamas have appeared to be at odds on an extension of a 72-hour ceasefire that expires at 8am tomorrow. Egypt has been mediating between the two sides.

A Hamas spokesperson said that it will resume fighting if the talks in Cairo fail.

Gaza conflict in numbers

Mr Obama said peace efforts needed to involve Palestinian President Mahmoud Abbas, amid US fears that the conflict has empowered the more militant Hamas.

Mr Obama said that the Abbas-led Palestinian Authority, based in the West Bank, has been "responsible" by recognising Israel and seeking a two-state solution.

"I think Abu Mazen is sincere in his desire for peace, but they (the Palestinian Authority) have also been weakened, I think, during this process," Mr Obama said, referring to Mr Abbas by his nom de guerre.

"The populations in the West Bank may have also lost confidence or lost a sense of hope in terms of how to move forward."

Israeli Prime Minister Benjamin Netanyahu said yesterday the Palestinian Authority should play an "important" role in Gaza.

Mr Netanyahu had earlier rejected further negotiations with Mr Abbas after he formed a coalition with Hamas amid the breakdown of the US-led peace process.

Meanwhile, Hamas said it had executed several Palestinians on suspicion of helping Israeli forces during the month-long Gaza war.

"The spies were executed after they were caught red-handedly informing on the whereabouts of the resistance (or) disrupting the work of resistance men and defusing ambushes prepared against the enemy," Al-Majd, a pro-Hamas website, quoted an unnamed member of the Islamist group's security services as saying.

It did not elaborate on the number of people executed.