JERUSALEM (AP) -- Israel and the Hamas militant group edged closer to a cease-fire Tuesday to end a weeklong Israeli offensive in the Gaza Strip, but after a day of furious diplomatic efforts involving the U.S. secretary of state, U.N. chief and Egypt's president, a deal remained elusive and fighting raged on both sides of the border.
Israeli tanks and gunboats pummeled targets in Gaza in what appeared to be a last-minute burst of fire, while at least 200 rockets were fired into Israel. As talks dragged on near midnight, Israeli and Hamas officials, communicating through Egyptian mediators, expressed hope that a deal would soon be reached, but cautioned that it was far from certain.
"If there is a possibility of achieving a long-term solution to this problem by diplomatic means, we prefer that. But if not, then I am sure you will understand that Israel will have to take whatever actions are necessary to defend its people," Israeli Prime Minister Benjamin Netanyahu said at a late-night meeting with visiting Secretary of State Hillary Rodham Clinton.
Clinton was hastily dispatched to the region by President Barack Obama to join a high-profile group of world leaders working to halt the violence. Standing alongside the Israeli leader, Clinton indicated it could take some time to iron out an agreement.
"In the days ahead, the United States will work with our partners here in Israel and across the region toward an outcome that bolsters security for the people of Israel, improves conditions for the people of Gaza and moves toward a comprehensive peace for all people of the region," she said.
Clinton expressed sorrow for the heavy loss of life on both sides, but called for the Palestinian rocket attacks on Israel to end and stressed that the American commitment to Israel's security is "rock solid."
"The goal must be a durable outcome that promotes regional stability and advances the security and legitimate aspirations of Israelis and Palestinians alike," she said.
In Washington, State Department spokeswoman Victoria Nuland said Clinton met with Netanyahu and other Israeli officials for two hours.
"They discussed efforts to de-escalate the situation and bring about a sustainable outcome that protects Israel's security and improves the lives of civilians in Gaza," Nuland said. "They also consulted on her impending stops in Ramallah and Cairo, including Egyptian efforts to advance de-escalation."
Israel launched the offensive on Nov. 14 in a bid to end months of rocket attacks out of the Hamas-run territory, which lies on Israel's southern flank. After assassinating Hamas' military chief, it has carried out a blistering campaign of airstrikes, targeting rocket launchers, storage sites and wanted militants.
The campaign has killed more than 130 Palestinians, including dozens of civilians, and wounded hundreds of others. Five Israelis have been killed by rocket fire, including a soldier and a civilian contractor on Tuesday.
With Israel massing thousands of ground troops on the Gaza border, diplomats raced throughout the region in search of a formula to halt the fighting.
In a meeting with Netanyahu, U.N. chief Ban Ki-moon condemned Palestinian rocket attacks, but urged Israel to show "maximum restraint."
"Further escalation benefits no one," he said.
Israel demands an end to rocket fire from Gaza and a halt to weapons smuggling into Gaza through tunnels under the border with Egypt. It also wants international guarantees that Hamas will not rearm or use Egypt's Sinai region, which abuts both Gaza and southern Israel, to attack Israelis.
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 has rejected such demands in the past.
Egypt's new Islamist government is expected to play a key role in maintaining a deal.
The crisis has thrust Egypt's president, Mohammed Morsi, into the spotlight as he plays a difficult balancing act.
Morsi belongs to the Muslim Brotherhood, Hamas' parent movement, and clearly sympathizes with the Islamic militant group. At the same time, he relies heavily on U.S. aid and is trying to preserve a historic peace agreement with Israel.
Earlier, Morsi raised hopes that a cease-fire was near when he predicted the negotiations would yield "positive results" during the coming hours.
Netanyahu also said his country would be a "willing partner" in a cease-fire agreement.
But as the talks stretched into the evening, it became clear that a deal remained a ways off.
"Most likely the deal will be struck tomorrow. Israel has not responded to some demands, which delayed the deal," Hamas official Izzat Risheq said.