International humanitarian law does not treat all civilian deaths as equal. Instead, it relies on the principle of distinction to separate intentional targets from accidental consequences. Under the Geneva Conventions, combatants must always distinguish between military objectives and civilians. Deliberately aiming a weapon at a residential building filled with families is a war crime. There is no legal way to justify such an act.
The concept of "collateral damage" enters the conversation through the principle of proportionality. This rule acknowledges that civilian harm can happen during a strike against a legitimate military target. However, this harm must not be excessive compared to the direct military advantage expected. If a commander strikes a house to kill one low-level soldier, but destroys an entire apartment block, they have likely violated this principle.
Legality depends heavily on intent and precautions. Soldiers are required to take all feasible measures to minimize civilian loss, such as choosing specific munitions or timing strikes when streets are empty. When a weapon hits a home due to faulty intelligence or mechanical failure despite these precautions, the law often classifies it as an unfortunate byproduct of combat. When the strike is reckless or intended to terrorize, it crosses the line into criminal targeting.