A second wave of Israeli airstrikes, around 2:30 a.m. Sunday, hit 10 targets in all, eight of them near Deir El Balah, the Israeli military said. False alarms set off sirens in southern Israel during the strikes early Sunday, it said.

Tensions have been building for months between Israel and Hamas, the Islamic militant group that rules Gaza, as a humanitarian crisis intensifies in the cramped coastal enclave of two million Palestinians.

Already beleaguered by Israel’s decade-old blockade of the strip, Gazans were made to suffer even more last year when the Palestinian Authority, run by Fatah, imposed harsh new restrictions in a power struggle with Hamas, its archrival. An attempt at reconciliation between the two last fall has since bogged down, and a standoff over salaries and revenue has sent the territory’s economy into free-fall, with many expecting a war with Israel as a result.

Colonel Conricus said the Israeli soldiers, whose injuries were not life-threatening, were hurt as they inspected a Palestinian flag that had been placed along the Gaza-Israel fence Friday morning amid a chaotic riot of hundreds of protesters, who were throwing rocks and trying to tear down the fence — and who were also obscured from view by a morning fog.

He said the episode showed that Israel was right to treat protests at the Gaza fence as a military threat.

“We’ve been speaking about these staged riots for a long time,” Colonel Conricus said. “When Hamas organizes these riots and pushes people towards the fence, what we’re saying is, this isn’t a peaceful demonstration, these people aren’t unarmed, they’re rioters — and among the rioters are actual terrorist operatives who have other things in mind.”

Mr. Netanyahu, who wished the wounded soldiers a speedy recovery from Munich, where he was attending a security conference, also responded angrily to remarks by the prime minister of Poland, Mateusz Morawiecki, after he stirred new controversy in defending a Polish law that criminalizes references to Nazi killing sites during the Holocaust as “Polish death camps.”