The cease-fire, which was to take effect at 9 p.m. local time (2 p.m. EST), was formally announced by Secretary of State Hillary Rodham Clinton and Foreign Minister Mohamed Amr of Egypt at a news conference here. It appeared to avert an escalating battle between Palestinians and Israelis that had threatened to turn into wider war.
“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.”
The negotiators reached an agreement after days of nearly nonstop Israeli aerial assaults on Gaza, the Mediterranean enclave run by Hamas, the militant Islamist group, which had fired hundreds of rockets into Israel from an arsenal it has been amassing in the aftermath of the three-week Israeli invasion four years ago.
The agreement came despite fears that a bus bombing in Tel Aviv earlier in the day, which Hamas and other Palestinian militant groups applauded, would scuttle the negotiations. There were also fears that Israel strikes overnight into Gaza had further dimmed the prospects for success by Mrs. Clinton and Mr. Morsi.
Egyptian and American officials did not immediately divulge details on the agreement and it was unclear how it would be enforced.
An agreement had been on the verge of completion Tuesdaybut was delayed on 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.
The Hamas Health Ministry in Gaza said the Palestinian death toll after a week of fighting stood at 140 at noon. At least a third of those killed are believed to have been militants. On the Israeli side, five Israelis have been killed, including one soldier.
Around noon on Wednesday in the Gaza Strip, according to the Hamas government media office, a bomb hit the house of Issam Da’alis, an adviser to Ismail Haniya, the Hamas prime minister. The house had been evacuated. Earlier, a predawn airstrike near a mosque in the Jabaliya refugee camp killed a 30-year-old militant, a spokesman said, and F-16 bombs destroyed two houses in the central Gaza Strip.
There were 23 punishing strikes against the southern tunnels that are used to bring weapons as well as construction material, cars and other commercial goods into Gaza from the Sinai Peninsula.
Within Gaza City, Abu Khadra, the largest government office complex, was obliterated overnight. Businesses were also damaged, including two banks and a tourism office, and electricity cables fell on the ground and were covered in dust.
Separately, a bomb dropped from an F-16 created a 20-foot-wide crater in an open area in a stretch of hotels occupied by foreign journalists. Several of the hotels had windows blown out by the strike around 2 a.m., but no one was reported injured. By morning, the hole in the ground had filled with sludgy water, apparently from a burst pipe, appearing almost like a forgotten swimming hole with walls made of sand and cracked cinder block.
Surveying damage near a government complex, Raji Sourani of the Palestinian Center for Human Rights said Gaza civilians were “in the eye of the storm,” and accused Israel of “inflicting pain and terror” on them. Israeli officials accuse Hamas of locating military sites in or close to civilian areas.
Overnight, as the conflict entered its eighth day, the Israeli military said in Twitter posts that “more than 100 terror sites were targeted, of which approximately 50 were underground rocket launchers.” The targets included the Ministry of Internal Security in Gaza, described as “one of Hamas’s main command and control centers.”
While there was no immediate or formal claim of responsibility for the bus bombing in Tel Aviv, a message on a Twitter account in the name of Al Qassam Brigades, the armed wing of the Hamas authorities in the Gaza Strip, declared: “We told you IDF that our blessed hands will reach your leaders and soldiers wherever they are, ‘You opened the Gates of hell on Yourselves.’ ” The letters I.D.F. refer to the Israel Defense Forces.
On several occasions since the latest conflagration seized Gaza last week, militants have aimed rockets at Tel Aviv, but they have either fallen short, landed in the sea or been intercepted. Hundreds of rockets fired by militants in Gaza have struck other targets.
But the bombing seemed to be the first time in the fighting that violence had spread directly onto the streets of Tel Aviv.
On Tuesday — the deadliest day of fighting in the conflict — Mrs. Clinton arrived hurriedly in Jerusalem and met with Prime Minister Benjamin Netanyahu of Israel to push for a truce.
Her visit to Cairo on Wednesday to consult with Egyptian officials in contact with Hamas placed her and the Obama administration at the center of a fraught process with multiple parties, interests and demands.
Before leaving for Cairo, Mrs. Clinton visited the West Bank to meet Mahmoud Abbas, the head of the Palestinian Authority, which is estranged from the Hamas rulers of the Gaza Strip and has increasingly strained ties with Israel over a contentious effort to upgrade the Palestinian status at the United Nations to that of a nonmember state. Mrs. Clinton is to meet again with Mr. Netanyahu before heading for Egypt, the reports said.
Mr. Abbas’s faction is favored by the United States, but it is not directly involved in either the fighting in Gaza or the effort in Cairo to end it. Like Israel and much of the West, the United States regards Hamas as a terrorist organization.
The Israelis, who had amassed tens of thousands of troops on the Gaza border, had threatened to invade for a second time in four years to end the rocket fire.
David D. Kirkpatrick reported from Cairo, Ethan Bronner from Jerusalem and Rick Gladstone from New York. Reporting was contributed by Jodi Rudoren and Fares Akram from Gaza; Isabel Kershner from Jerusalem; Alan Cowell from London; Andrea Bruce from Rafah; and Christine Hauser from New York.