The surge in cross-border violence came hours after a landmark visit to Gaza by the emir of Qatar, Sheik Hamad bin Khalifa al-Thani, who pledged $400 million for projects there. It also came as a major American-Israeli joint military exercise was under way in Israel, underlining the volatility and potential for escalation in the area at a delicate time before the American elections in November and Israeli elections scheduled for January.

Ehud Barak, the Israeli defense minister, warned on Wednesday that Israel would not be deterred from carrying out action required to restore quiet in the south.

"If a ground operation will be necessary, there will be a ground operation," he told Israel Radio. "Nobody is eager for this but we will act, as we are required to stop this wave and to increase the effectiveness of the operation."

The emir was the first head of state to visit the Gaza Strip since Hamas, the Islamic militant group, took full control of the coastal enclave in 2007, and the gesture was hailed by Hamas as an important breach of the political and economic blockade that has kept Gaza largely isolated.

But early on Wednesday Israel closed the Erez crossing point, the gateway for individuals and aid workers passing between Israel and Gaza, and the Kerem Shalom commercial crossing for goods, citing the danger from rocket fire. Maher Abu Sabha, the director of crossings in Hamas-run Gaza, said that a Hamas police checkpoint near Erez, at the northern end of the territory, was evacuated after an officer was injured by shells that landed there.

A medical spokesman in Gaza also said that the Israeli strikes had wounded seven people, some of them seriously. The latest round of violence appears to have started over the weekend. Both sides refrained from any actions during the hours of the emir's visit, but on Tuesday morning, hours before his arrival in Gaza, an Israeli officer was severely wounded in a blast from an explosive device placed by Palestinian militants along the border.

The renewed violence and the temporary closure of the crossings was a stark reminder of the difficulties that Gaza has in attracting investment, and of the significance of the gesture by the emir, whose infusion of aid is earmarked for the building of two housing complexes, the rehabilitation of three main roads and for a prosthetic center, among other projects.

Gaza suffered widespread destruction during Israel's three-week military offensive in the winter of 2008-2009, which came after years of persistent rocket fire from Gaza into southern Israel. Reconstruction has been a painstaking business. Israel still imposes tight restrictions on the import to Gaza of building materials for fear that they could be used by Hamas for the manufacture of weapons or fortifications, limiting approval to projects overseen by international organizations.

All this makes it all the more curious that Hamas, which has largely abided by an informal cease-fire with Israel in recent years, is a party to the latest round of violence. Its military wing claimed responsibility on Wednesday for firing rockets into Israel "as a response to the ongoing aggression against the Palestinian people." Hamas has been under local pressure from more radical groups in recent months and may be eager to show that it has not abandoned what it calls the resistance against Israel.

Hamas said it had fired the rockets at Israeli military bases along the Gaza border, but several of them slammed into rural villages in southern Israel, hitting a number of houses and buildings. The Israeli authorities closed schools in the area and instructed residents to remain close to protected spaces and bomb shelters.

Such cross-border exchanges have broken out sporadically over recent months and Israeli officials say that more than 600 rockets have been fired from Gaza into southern Israel this year.

But the introduction of Israel's Iron Dome anti-rocket missile system, developed with financing from the United States, has allowed Israel more room for maneuver. In many cases the system has intercepted longer-range rockets from Gaza that were headed toward Israeli cities, avoiding mass casualties and the subsequent imperative for a strong Israeli response.

On Wednesday, Iron Dome intercepted seven rockets that were headed toward densely populated areas of southern Israel, according to the Israeli military.

The success of the Iron Dome system is also an important boost for President Obama as he seeks in his campaign to emphasize his administration's military and security commitment to Israel. In Monday's foreign policy debate with Mitt Romney, the Republic challenger for the presidency, Mr. Obama told how he had visited the Israeli town of Sderot, near the Gaza border, during his last campaign. Noting that the town "had experienced missiles raining down from Hamas" he said his administration had financed the Iron Dome program "to stop those missiles."

Fares Akram contributed reporting from Gaza.