JERUSALEM — Palestinian militants from Gaza fired dozens of rockets and mortar shells into southern Israel overnight Tuesday and into Wednesday morning, critically wounding two Thai workers in an Israeli border community, Israeli authorities said. Four Palestinian militants in rocket-launching squads were killed in Israeli airstrikes, according to Palestinian officials.
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 underway in Israel, underlining the volatility and potential for escalation in the area at a delicate time before the US elections in November and Israeli elections scheduled for January.
Ehud Barak, the Israeli defense minister, warned 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 Wednesday, Israel closed the Erez crossing point, the gateway for individuals and aid workers passing between Israel and Gaza, and also shut down 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 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 the Israeli strikes had wounded seven people.