Israeli officials say they have no choice: Hamas fighters, numbering perhaps 30,000 by Israeli estimates, embed within Gaza’s population of 2.2 million and store weapons in or under civilian sites, daring Israel to launch strikes that fuel outrage. The officials also say Hamas is clearly guilty of intentionally murdering Israeli civilians.

President Biden and his aides have been careful not to even hint in public that Israel could be violating any laws of war. And the State Department continues to approve sales of weapons to Israel while refraining from making any assessments of the legality of Israel’s actions. Some diplomats are uneasy with that, especially since the department formally pledged earlier this year to investigate episodes of civilian casualties involving American-made weapons.

Israel says it is impossible to defeat its enemy without killing innocents — a lesson that Americans and their allies should understand.

“In 1944, the Royal Air Force bombed the Gestapo headquarters in Copenhagen — a perfectly legitimate target,” Prime Minister Benjamin Netanyahu of Israel said in an address to his nation on Oct. 30. “But the British pilots missed and instead of the Gestapo headquarters, they hit a children’s hospital nearby. And I think 84 children were harmed and burned to death. That is not a war crime. That is not something you blame Britain for doing.” (In fact the bombing was in 1945, hit a school, and is believed to have killed 86 children and 18 adults.)

Mr. Netanyahu added that the attack “was a legitimate act of war with tragic consequences that accompany such legitimate action. And you didn’t tell the Allies, ‘Don’t stamp out Nazism because of such tragic consequences.’”

Israeli officials have also invoked American battles against insurgents in the Iraqi city of Falluja in 2004, during the U.S. occupation of Iraq, and, in tandem with Iraqi government forces, against the Islamic State terrorist group in the Iraqi city of Mosul from 2016 to 2017.

And during Secretary of State Antony J. Blinken’s visits to Israel after the Oct. 7 Hamas attacks, Israeli officials privately invoked the 1945 U.S. atomic bombings of Hiroshima and Nagasaki.

“In any combat situation, like when the United States was leading a coalition to get ISIS out of Mosul, there were civilian casualties,” Mark Regev, an Israeli government spokesman, said in an Oct. 24 interview with PBS. Mr. Regev said that Israel’s “ratio” of Hamas fighters to civilians killed “compares very well to NATO and other Western forces” in past military campaigns.