The prospect of a Hamas-Israel ceasefire drew closer tonight after encouraging hints that both sides were near to a deal.

Israel and Hamas said they were open to diplomatic mediation efforts being led by Egypt, but they remained apart in their demands. Hamas officials said agreement was close.

Israeli prime minister Benjamin Netanyahu at a meeting with UN chief Ban Ki-moon, in the region as part of an international diplomatic push to end nearly a week of fighting, said that "if a long-term solution can be put in place by diplomatic means, Israel will be a willing partner."

Israel launched the offensive last week to end months of rocket fire from the Gaza Strip.

Mr Ban has condemned the rocket attacks but urged Israel to show "maximum restraint." He also has offered his services to help broker a truce.

Earlier Egyptian president Mohammed Morsi said Israel's "aggression" against Gaza will end tomorrow.

Mr Morsi did not provide any evidence to support his prediction that an end to Israel's weeklong offensive against Gaza was imminent. He only said negotiations between Israel and Gaza's Hamas rulers will yield "positive results" during the coming hours.

Meanwhile resident Barack Obama has sent Secretary of State Hillary Clinton to the region as the US urgently seeks to end the conflict that has killed more than 100 people in the last week.

She is to meet Mr Netanyahu in Jerusalem, Palestinian officials in Ramallah, in the West Bank, and Egyptian leaders in Cairo.

Her trip marks the Obama administration's most forceful engagement in the conflict .

While the US has backed Israel's right to defend itself against rocket fire from Gaza, Washington has warned its ally against pursuing a ground assault that would further escalate the violence and could dramatically increase casualties on both sides.

Ahead of her arrival, Mr Obama spoke by phone for almost a half-hour with Mr Morsi, commending his efforts to de-escalate tensions.

Mrs Clinton is not heading to the Middle East with any specific proposal to broker a peace deal, US officials said. She will reassure Israel it has full American support while urging it to limit civilian casualties, and she will press members of the Western-backed Palestinian government in the West Bank to influence its brethren in Gaza to halt the rocket fire.

In Cairo, she will strike a similar note by reminding the Egyptian government of its peace obligations with Israel under a treaty they share.

Hamas wants Israel to halt all attacks on Gaza and lift tight restrictions on trade and movement in and out of the territory that have been in place since Hamas seized Gaza by force in 2007.

Israel demands an end to rocket fire from Gaza and a halt to weapons smuggling into Gaza through tunnels under the border with Egypt.

Civilians account for 54 of the 113 Palestinians killed since Israel began an air onslaught that has so far included nearly 1,500 strikes. Some 840 people have been wounded, including 225 children, Gaza health officials said.

Three Israeli civilians have also been killed and dozens wounded since the fighting began, the numbers possibly kept down by a rocket-defence system that Israel developed with US funding. More than 1,000 rockets have been fired at Israel this week, the military said.

In the latest attack a Palestinian rocket hit the outskirts of Jerusalem, landing harmlessly in an open area in one of the longest strikes fired from the Gaza Strip.

Jerusalem, nearly 50 miles from Gaza, is the most distant city the militants have targeted, signalling an increasing sophistication in their arsenal.

The attacks aimed at Jerusalem and the Tel Aviv area have dramatically showcased the militants' new capabilities, including a locally made M-75 rocket that appears to have taken Israeli defence officials by surprise.