JERUSALEM — An Israeli military tactic intended to spare civilians actually killed two Palestinian teenagers recently and needs to be viewed as a form of attack, not as the ethically responsible precautionary measure that Israel portrays it to be, two human rights groups said in a new report.

The tactic is referred to as “knocking on the roof,” a euphemism for hitting a building with loud but not terribly destructive munitions before switching to the powerful missiles or bombs meant to level it.

The report assembled crowdsourced video into a meticulous reconstruction of the killings of two teenage boys in an airstrike in July on an unfinished high-rise in Gaza City, the first of four “roof-knocking” missiles meant to warn off civilians that instead killed them.

The bottom line, it concluded, was that an airstrike must not be considered a warning, and must conform to international humanitarian law requiring armies to take pains to identify legitimate targets and avoid harming civilians.