Israel prepared Friday for a possible ground invasion of the Gaza Strip as Hamas militants continued to lob rockets into Israel, and one of them landed near Jerusalem for the first time since 1970.

The rocket strikes outside Jerusalem and Tel Aviv, Israel’s main population centers, sharply raised the stakes in the ongoing standoff between Israel and Gaza’s Hamas rulers, providing sobering evidence that Palestinian militants possess weaponry that can strike deeper inside Israel than ever before. In particular, the strike on Jerusalem — a city both Israelis and Palestinians claim as their capital — was viewed as a major provocation that made an Israeli ground invasion seem ever more likely.

While Israeli officials maintained that they did not seek war, the intent to send a loud warning to Hamas was evident. By nightfall, the Israeli military said it had closed three roads leading to Gaza, in a further sign of a possible ground invasion, and a spokesman said paratroopers and infantry soldiers were in southern Israel awaiting orders from political leaders.

“Israeli citizens, like any other people, deserve peace and quiet, so they can go about living their lives,” Deputy Foreign Minister Danny Ayalon told CNN on Friday. “If we will see in the next 24, 36 hours more rockets launched at us, I think that would be the trigger” for a ground operation, he said.

A ground operation might be seen as necessary to hobble Hamas’s still-potent military capabilities in Gaza, the stated goal of the three-day-old Israeli operation. But it is a risky proposition, particularly two months before national elections in Israel. While the air offensive has won support from the public and opposition politicians, buttressing Defense Minister Ehud Barak’s and Prime Minister Benjamin Netanyahu’s already strong security credentials, a ground war could be protracted and messy.

After an initial announcement that Israel had called up 16,000 reservists, Barak said Friday that he had authorized additional call-ups, and local news reports said the new figure was 75,000 troops.

Four years ago, Israel sent ground troops into Gaza one week after the start of an operation also intended to halt unremitting rocket attacks on Israeli population centers by Hamas, an Islamist movement that the United States and Israel consider a terrorist organization. It ended two weeks later amid loud international criticism and left 13 Israelis and more than 1,000 Palestinians dead, hundreds among them civilians.

Casualties have been far lower in the current operation, suggesting that Israel is highly motivated to avoid a repeat of Cast Lead, as the 2008-2009 operation was code-named. By Friday night, Gaza medical officials said 30 Palestinians had been killed by Israeli airstrikes. Three Israelis have been killed by the rocket fire coming out of Gaza.

Friday began with a temporary truce between Israel and the Gaza militants to accommodate a visit to the coastal strip by Egyptian Prime Minister Hesham Kandil. But the cease-fire quickly crumbled, as the Palestinians launched new waves of attacks, and Gaza residents said Israel responded with renewed airstrikes. The Israeli military denied that.

The Israeli military said 196 rockets were fired into Israel from midnight Thursday to Friday evening, 99 of which were intercepted by a missile defense system.

Air raid warning sirens sounded for a second day in Tel Aviv, and for the first time in Jerusalem. Israeli police spokesman Mickey Rosenfeld said two explosions were heard, and police found one rocket in an open area near the West Bank settlement bloc of Gush Etzion, south of Jerusalem. He said they were still searching for a second.

Hamas’s military wing said it had fired two Gaza-made M-75 rockets — a new projectile that the group said had a range of about 45 miles — toward Jerusalem, which is about 50 miles north of the Gaza border. The strike offered evidence that hundreds of Israeli airstrikes since Wednesday had not depleted Hamas’s stockpiles of longer-range rockets, which the Israeli military says have been greatly bolstered over the past two years by contributions from Iran and smuggled-in weapons from Libya.

Even if the rocket missed by a handful of miles, targeting Jerusalem was a surprisingly risky move that carried the potential of a major backlash — not just from Israel, but from the Palestinian public and Hamas’s Arab allies. East Jerusalem is home to hundreds of thousands of Arabs, and the al-Aqsa mosque in the Old City is Islam’s third-holiest site.

“We are sending a short and simple message: There is no security for any Zionist on any single inch of Palestine, and we plan more surprises,” Abu Obaida, a spokesman for the Hamas militant wing, told the Associated Press.

Earlier Friday, Kandil and Hamas Prime Minister Ismail Haniyeh toured Gaza’s al-Shifa hospital. As a scrum of photographers and camera crews recorded the moment, Kandil placed his hand on the head of a young boy killed in a recent strike.

“I have seen now Gaza, and the hospital, and the martyred child Mohammed Yasser,” Kandil said, pausing as he choked up with emotion. Flanked by guards in olive flak jackets, he lifted his arms to show reporters spots of blood on the sleeves of his suit jacket. “These are the signs, the blood spatters of our brethren,” Kandil said. “This tragedy cannot be ignored, and the whole world has to shoulder the responsibility to stop its aggression. We are standing with you.”

A deployment of troops into Gaza would probably face little political opposition in Israel, where the operation has gotten widespread support and amounted to a political victory for Netanyahu, if not yet a military one. Labor Party chair Shelly Yacimovich, a reliable Netanyahu critic, described the assassination of the Hamas military chief that opened the offensive as “amazing.”

On Friday, President Shimon Peres, who often serves as a dovish counterweight to Netanyahu, said: “This is not the launch of a war, but a justified defense of our civilians.”

One of those Israeli civilians, Katya Fayngart, a 28-year-old resident of the southern Israeli city of Beersheba, said she had faith that Netanyahu was working to stop the sirens that during calm times send her racing, with her husband and baby, to their stairwell at least twice a week. These days, she said, the drill happens multiple times an hour.

“We have to trust him to get us to the point when we can live our lives,” she said.

Many Gazans say they think politics drove the Israeli decision to strike the strip, which Israeli officials deny. According to a report in Haaretz newspaper on Friday, Barak — who is also seeking votes for his small political party — said the trigger was a rare opportunity to assassinate Hamas commander Ahmed al-Jabari. Netanyahu was already a clear favorite in the coming elections.

Some Israeli political analysts say that if the timing was motivated by the election, it was poorly calculated. Two months leaves much room for political damage if, say, civilian casualties, international opposition or rockets on Tel Aviv rise.

Netanyahu would prefer to keep Iran’s nuclear program, not Gaza, his signature security issue, but rocket attacks from Gaza threatened to make him look weak, said Reuven Hazan, chair of the political science department at Hebrew University.

“The prime minister is now putting his political campaign in the hands of every pilot in the air. The pilots are extremely well-trained, and they’re elite. It isn’t the same with ground troops,” he said, adding: “Unless we’re willing to go into Gaza and just level the place, we’re not going to win.”

Islam Abdul-Karim in Gaza and Debbi Wilgoren in Washington contributed to this article.