There seems to be a broad consensus atop the Democratic Party about the war in Gaza, structured around two propositions. First, after the attacks of Oct. 7, Israel has the right to defend itself and defeat Hamas. Second, the way Israel is doing this is “over the top,” in President Biden’s words. The vast numbers of dead and starving children are gut wrenching, the devastation is overwhelming, and it’s hard not to see it all as indiscriminate.

Which leads to an obvious question: If the current Israeli military approach is inhumane, what’s the alternative? Is there a better military strategy Israel can use to defeat Hamas without a civilian blood bath? In recent weeks, I’ve been talking with security and urban warfare experts and others studying Israel’s approach to the conflict and scouring foreign policy and security journals in search of such ideas.

The thorniest reality that comes up is that this war is like few others because the crucial theater is underground. Before the war, Israelis estimated Hamas had dug around 100 miles of tunnels. Hamas leaders claimed they had a much more expansive network, and it turns out they were telling the truth. The current Israeli estimates range from 350 to about 500 miles of tunnels. The tunnel network, according to Israel, is where Hamas lives, holds hostages, stores weapons, builds missiles and moves from place to place. By some Israeli estimates, building these tunnels cost the Gazan people about a billion dollars, which could have gone to building schools and starting companies.

Hamas built many of its most important military and strategic facilities under hospitals, schools and so on. Its server farm, for example, was built under the offices of the U.N. relief agency in Gaza City, according to the Israeli military.

Daphne Richemond-Barak, the author of “Underground Warfare,” writes in Foreign Policy magazine: “Never in the history of tunnel warfare has a defender been able to spend months in such confined spaces. The digging itself, the innovative ways Hamas has made use of the tunnels and the group’s survival underground for this long have been unprecedented.”

In other words, in this war, Hamas is often underground, the Israelis are often aboveground, and Hamas seeks to position civilians directly between them. As Barry Posen, a professor at the security studies program at M.I.T., has written, Hamas’s strategy could be “described as ‘human camouflage’ and more ruthlessly as ‘human ammunition.’” Hamas’s goal is to maximize the number of Palestinians who die and in that way build international pressure until Israel is forced to end the war before Hamas is wiped out. Hamas’s survival depends on support in the court of international opinion and on making this war as bloody as possible for civilians, until Israel relents.