CAIRO — Israel and Hamas agreed to a cease-fire on Wednesday, the eighth day of lethal fighting over the Gaza Strip, in a deal completed under strong American and Egyptian diplomatic pressure that quieted an aerial battle of rockets and bombs and forestalled — for now — an escalation into an Israeli invasion.
The cease-fire, which took effect at 9 p.m. local time (2 p.m. Eastern), was formally announced by Secretary of State Hillary Rodham Clinton and Foreign Minister Mohamed Amr of Egypt after intensive negotiations in Cairo. It was welcomed by all sides, but whether the cease-fire could hold was uncertain.
Even in the minutes leading up to the effective start time, the antagonists were firing at each other, and the Israeli authorities reported at least five Palestinian rockets were lobbed into southern Israel shortly after the cease-fire had begun. But no damage or injuries were reported and the rocket fire seemed to end in the second hour. In Gaza, thousands of residents came outside to celebrate.
“This is a critical moment for the region,” Mrs. Clinton, who rushed to the Middle East late Tuesday in an intensified effort to halt the hostilities, told reporters in Cairo. She thanked Egypt’s president, Mohamed Morsi, who played a pivotal role in the negotiations, for “assuming the leadership that has long made this country a cornerstone of regional stability and peace.”
Mrs. Clinton also pledged to work “with our partners across the region to consolidate this progress, improve conditions for the people of Gaza, provide security for the people of Israel.”
Mr. Amr said Egypt’s role in reaching the agreement reflected its “historical commitment to the Palestinian cause” and Egypt’s efforts to “bring together the gap between the Palestinian factions.”
The top leader of Hamas, Khaled Meshal, also had strong words of praise for the Egyptian leader, a former official in the Muslim Brotherhood, in which Hamas has roots. At a news conference in Cairo, Mr. Meshal thanked Egypt for its role and said Israel had “failed in all its objectives.”
The negotiators reached an agreement after days of nearly nonstop Israeli aerial assaults on Gaza, the Mediterranean enclave run by Hamas, and the firing of hundreds of rockets into Israel from an arsenal Hamas had been amassing since the three-week Israeli invasion four years ago.
Under the terms distributed after the cease-fire was announced, Israel agreed to stop all land, sea and air hostilities in Gaza, including the “targeting of individuals” — a reference to militants of Hamas and its affiliates who have been killed. The cease-fire also called on the Palestinian factions in Gaza to stop all hostilities against Israel, including rocket attacks and attacks along the border.
But the terms also state that underlying grievances of Gazans, most notably the border restrictions Israel has imposed that impede the movement of people and goods through Gaza, will be addressed starting 24 hours after the cease-fire is in effect. Precisely how they will be addressed was left unclear.
Also left unclear was how the agreement would be enforced, but the terms stated that “each party shall commit itself not to perform any acts that would breach this understanding.”
The agreement came despite a bus bombing in Tel Aviv earlier in the day, applauded by Hamas and other Palestinian militant groups, which invited Israeli reprisals and threatened to derail the talks. Also complicating the path to the cease-fire were Israeli strikes overnight on Gaza.
Prime Minister Benjamin Netanyahu of Israel, who had been threatening to start another ground invasion if the Gaza rockets did not stop, said in a statement that he was satisfied, for the moment, with the outcome. But he left open the possibility of more military action.
The statement issued by his office said Mr. Netanyahu had spoken with President Obama and “responded positively to his recommendation to give a chance to the Egyptian proposal for a cease-fire and to allow an opportunity to stabilize the situation and to calm it down before there is a need to use much greater force.”
An agreement had been on the verge of completion on Tuesday, but was delayed over a number of issues, including Hamas’s demands for unfettered access to Gaza via the Rafah crossing into Egypt and other steps that would ease Israel’s economic and border control over other aspects of life for the more than one million Palestinian residents of Gaza, which Israel vacated in 2005 after 38 years of occupation.