Israeli Prime Minister Benjamin Netanyahu has said his country must prepare for a protracted war in Gaza.

The comments squash any hopes of a swift end to fighting that has already cost more than 1,000 lives.

In a televised address, Mr Netanyahu said that any solution to the crisis would require the demilitarisation of the Palestinian territory, which is controlled by Hamas Islamists and their militant allies.

"Israeli citizens cannot live with the threat from rockets and from death tunnels - death from above and from below," he said.

"We will not end this operation without neutralising the tunnels whose sole purpose is killing our citizens."

This afternoon, a huge explosion in a public garden in northern Gaza killed eight children and two adults, and wounded 40 others, Palestinian medics said.

Locals blamed the blast on an Israeli air strike, but Israel denied responsibility, saying it was a misfire by a rocket launched by Hamas militants.

At roughly the same time, another blast shook the grounds of Gaza's main Shifa hospital, without causing any casualties.

Israel, which has previously accused Hamas militants of hiding in the hospital, again blamed an errant missile.

Elsewhere, seven Palestinians were killed in an Israeli bombardment of the city of Rafah in the southern Gaza Strip tonight.

The seven, including five women and one child, died when their three-storey building was destroyed, said the spokesman for Gaza rescue services.

Israel has also said that five soldiers have been killed in and around Gaza.

The number included four soldiers killed by a mortar shell in southern Israel who media reports had initially identified as civilians.

These deaths mean that 48 Israeli soldiers have died in the conflict, along with three civilians killed by Hamas rockets and mortars that hit Israel

As night fell over Gaza, army flares illuminated the sky and the sound of intense shelling could be heard.

The military warned thousands of Palestinians to flee their homes in areas around Gaza City, usually the prelude to major army strikes.

Egypt has condemned Israel for using what it said was "excessive force" against civilians in Gaza.

It also urged Israel and Hamas to abide by the "humanitarian truce" proposed by Cairo and backed by the United Nations to end the 21-day conflict.

It said the truce would pave the way for a "permanent ceasefire".

Earlier today, UN Secretary-General Ban Ki-moon called on Israel and Hamas to stop the violence in Gaza.

"In the name of humanity, the violence must stop," Mr Ban told reporters.

Israel and Palestinian militants in Gaza have been locked in three weeks of fighting which have killed more than 1,050 people in Gaza, mostly civilians.

Today's blasts came during a relative lull in the fighting, coinciding with the Muslim holiday of Eid al-Fitr.

However, the Israeli army this afternoon sent messages to thousands of Palestinians living near Gaza City to flee shortly after a mortar shell killed at least four people in Israel.

"A short while ago, phonecalls were made and text messages were sent out to the civilian population of Shejaiya, Zeitun and eastern Jabaliya calling them to evacuate immediately towards central Gaza City," a statement from the army said.

President Higgins speaks of 'failure of diplomacy'

President Michael D Higgins has said the search for peace in Gaza should be stepped up.

Speaking in Armagh, the President said the appalling and escalating loss of life in Gaza was a tragic example of the failure of diplomacy.

He said there was an awareness among Irish citizens of the importance of building and securing a peaceful resolution to the conflicts in Gaza, Syria, Iraq, Ukraine and elsewhere.

Taoiseach Enda Kenny said the Israeli response to rocket attacks by Hamas is "not satisfactory".

He said the scale of the humanitarian crisis in Gaza, with loss of life, damage to infrastructure and problems with the supply of food and water is clear to see.

Speaking in Galway this afternoon, Mr Kenny said there is a very fragile situation in the region at the moment.

He said that while every country, including Israel, has a right to defend itself, this has to be exercised in a proportionate manner.

He said the Israeli approach in this regard was not satisfactory.

The Taoiseach said the Minister for Foreign Affairs has spoken to a number of ambassadors from the region to express the Government's views.