The Israeli authorities did not immediately confirm the origin of the rocket fire, but it was assumed that the source was Gaza, where the Palestinian militant group Hamas and its radical affiliates have amassed arsenals of smuggled rockets with increased ranges and more accurate trajectories in recent years. On Thursday, they launched at least two at Tel Aviv, Israel's biggest city, for the first time, and on Friday launched more as part of a response to a large-scale aerial assault by the Israelis on targets in Gaza and indications that Israel was close to launching its first ground invasion there in four years.
Jerusalem, a city holy to Jews, Muslims and Christians, had been previously thought off-limits to rocket attacks by militant Palestinians and others who reject Israel's claim to the city as its capital. Even Saddam Hussein, the Iraqi leader, had avoided targeting the city when he aimed Scud missiles at Israel during the first Persian Gulf War in 1991. The city is about 48 miles from the Gaza border.
The police in Jerusalem said no rockets fell within city limits, but one crashed harmlessly near a Jewish West Bank settlement just south of Jerusalem. A police spokesman, Micky Rosenfeld, said other explosions were heard in the same area but security forces had not located the landing sites.
The Jerusalem rocket attack came hours after scores of rockets were fired from Gaza into Israel, striking major cities of the south, causing widespread panic and damage and shattering plans for a temporary cease-fire during a remarkable visit to Gaza by the Egyptian prime minister that showed the shifting dynamics of Middle East politics since the turmoil of the Arab Spring uprisings.
The rocket fired at Tel Aviv on Friday probably landed in the sea, Mr. Rosenfeld said. Israeli officials say the only rockets in Gaza with a range that can reach Tel Aviv are the Iranian-made Fajr-5 projectiles that Israel has been targeting in its hundreds of airstrikes over the last few days.
That these rockets were still being fired seemed to weigh heavily in Israeli military calculations about a ground invasion. After a meeting with President Shimon Peres, Prime Minister Benjamin Netanyahu said the Israeli Army was "continuing to hit Hamas hard and is ready to expand the operation into Gaza," according to a statement from his office.
Mr. Netanyahu said the aim was "to take out the terrorist infrastructure in Gaza while doing everything possible not to harm civilians."
The rapidly escalating confrontation between Hamas and Israel followed an Israeli airstrike on Wednesday that killed the top commander of Hamas, and the tit-for-tat violence is widely seen as a potential catalyst for broader hostilities at a time of spreading turmoil in Syria and elsewhere in the region.
The Israeli military said Col. Amir Baram, commander of the Israel Defense Forces' paratroopers brigade, had addressed his forces during a preparatory briefing in the field, saying: "We are already 48 hours into an operation that we knew would have to happen. We have spoken about it during training, exercises and conferences. There is no doubt that we have to operate. This is why we enlisted, and why we have trained."
Witnesses on the Gaza-Israel border said Israeli tanks had massed in several places.
Early on Friday, the Israeli military said it had called up 16,000 army reservists to move against what Israel considers an unacceptable security threat from smuggled rockets amassed by Hamas, which does not recognize Israel's right to exist.
It was not initially clear whether the show of Israeli force on the ground was meant as more of an intimidation tactic to further pressure Hamas leaders, who had all been forced into hiding on Wednesday after the group's military chief, Ahmed al-Jabari, was killed in a pinpoint aerial bombing. But Israel's preparations seemed to pick up on Friday after the attempts to land rockets in Tel Aviv, while Hamas itself seemed emboldened by Egypt's support.
"The time in which the Israeli occupation does whatever it wants in Gaza is gone," said Ismail Haniya, the Hamas prime minister.
Initially, the Egyptian initiative was portrayed as a potential harbinger of reduced hostilities, and, as Prime Minister Hesham Qandil of Egypt prepared to travel to Gaza, Israel agreed to a temporary conditional cease-fire for the visit. But the truce never took hold.
Israel Radio said Palestinian militants had fired 25 rockets into southern Israel, one of them striking a house. There were no immediate reports of casualties.
What sounded like airstrikes by Israeli F-16s were also audible in Gaza City. The Israeli military said no such strikes had taken place, but the Hamas Health Ministry reported that two people, including a child, were killed in the north of Gaza City while the Egyptian delegation was on the ground.
The Palestinian death toll rose to 23 on Friday. The number included a man apparently executed by Hamas for what it said was collaboration with Israel in the deaths of 15 Palestinian leaders. Three Israelis were killed Thursday in a rocket attack in Kiryat Malachi, a small town in southern Israel, when a rocket fired from Gaza struck their apartment building.
The Egyptian prime minister's visit produced dramatic imagery to underpin his government's support for Hamas, which Israel, the United States and much of the West consider to be a terrorist organization.
Mr. Qandil and Mr. Haniya visited the Al Shifa hospital in Gaza City amid a huge scrum of bodyguards and journalists, saying they had carried the body of Mohammed Yasser, one of eight children who Palestinian health officials say have been killed in the surge of violence since Wednesday.
"This is the blood of our children on our clothes," Mr. Haniya said as he showed spatters on his clothing, "These are the Egyptian and the Palestinian blood united together."
Like the Egyptian president, Mohamed Morsi, on Thursday, Mr. Qandil walked a delicate line between support for Hamas, condemnation of Israel and a quest for calm in a region increasingly threatened by the spillovers from Syria's civil war, as well as by the long-festering impasse between the Israelis and Palestinians.
"The aim of this visit is not only to show political support but to support the Palestinian people on the ground," said Mr. Qandil, noting that he had brought with him a delegation from the Egyptian Health Ministry. He said a cease-fire between Gaza and Israel was "the only way to achieve stability in the region" and also called on the Palestinians to repair the rift between Hamas in Gaza and the Fatah group, which dominates the Palestinian Authority in the West Bank. "We call on the Palestinian people to unite because their power and strength is in their unity," Mr. Qandil said. "That's the only way to liberate Palestine."
The visit was the first of such a high-ranking Egyptian official to Gaza since the militant Hamas faction gained control in 2007, and offered a potent sign of how Egypt's revolution and new Islamist leadership since the overthrow of President Hosni Mubarak last year has shifted the geopolitics of the Israeli-Palestinian conflict.
Egypt, Mr. Qandil said, will "save nothing to stop the aggression and achieve a continuous cease-fire on the way to having a Palestinian state with Jerusalem as its capital."
Mr. Haniya said: "Egypt cannot accept the aggression as before. I welcome Egypt for this historical visit that comes in harmony with the will of the free Egypt."
Isabel Kershner reported from Jerusalem, Jodi Rudoren from Gaza City and Alan Cowell from Paris. Reporting was contributed by Fares Akram from Gaza, Rick Gladstone from New York, Rina Castelnuovo from the Gaza-Israel border, Mayy El Sheikh and David D. Kirkpatrick from Cairo, and Gabby Sobelman from Jerusalem.