This image from a Jan. 11 video released by the U.S. military shows an airstrike targeting an Islamic State cash distribution center near Mosul, Iraq. (Combined Joint Task Force-Operation Inherent Resolve via AP)

"Roof knocking" is a controversial Israeli military practice used in the Gaza Strip. It works on a simple logic designed to minimize civilian casualties. Occupants of a building are given a warning a few minutes before a military strike.

The first warning is generally a phone call. The second is a rocket.

The Israeli military has argued that the practice saves lives by giving occupants a chance to escape, but critics say the tactic creates confusion and can amount to psychological warfare. This week, the United States announced that it had used the tactic in Iraq.

U.S. military officials told reporters on Tuesday that roof-knocking had been carried out during an operation on April 5 in the Iraqi city of Mosul. The United States was targeting a building that was housing a member of the Islamic State and about $150 million in funds for the extremist group, officials said. However, a woman and children also were found to be visiting the house, raising the possibility that noncombatants could be killed in a strike.

To warn the occupants of the house about the impending strike, a Hellfire missile was fired above the building to explode in mid-air, Air Force Maj. Gen. Peter Gersten said. The tactic did not fulfill its goal: The woman ran back into the house before the second strike, which destroyed the building. Gersten said it was "very difficult for us to watch and it was within the final seconds of the actual impact."

Army Col. Steve Warren, a spokesman for the U.S.-led coalition in Iraq and Syria, said it was the first time that the tactic had been used by the U.S. "It was a test to see if it worked... it didn't," Warren said Wednesday.

The Israeli practice of roof-knocking goes back at least a decade. It was used widely during the 2008-2009 Operation Cast Lead. The Israel Defense Forces would later say that they made about 165,000 warning phone calls and adhered to the "innovative" roof-knocking tactic during the operation. This video, shot by a Gaza-based news agency, shows a roof-knock shortly before a building is destroyed by a missile during the 2014 Israel-Gaza conflict, known in Israel as Operation Protective Edge.

(Please note: The video above has been edited – its accompanying YouTube description says the second missile actually hit five minutes after the warning missile).

Even though the practice is designed to save lives, it remains deeply controversial. Roof-knocking shows not only the ease with which Israel can target specific sites within Gaza, but also how much it controls the Palestinian territory's telecommunications, generally routed through Israeli servers. There are reports that these warnings are sometimes not followed by strikes or that sometimes a strike is not preceded by a warning. In some cases, the warning may spur people to enter the house in the hope that their presence would deter a strike, while some warning strikes are said to have killed occupants.

“There is no way that firing a missile at a civilian home can constitute an effective ‘warning,’" Philip Luther, director of the Middle East and North Africa program at Amnesty International, said in a statement during the 2014 conflict. The U.N. Human Rights Council would later issue a report arguing that roof-knocks "cannot be considered an effective warning given the confusion they often cause to building residents and the short time allowed to evacuate before the actual strike."

Gersten said Tuesday that the use of the technique was not coordinated with Israel, though it was inspired by it. "We've certainly watched and observed their procedure," he told reporters. The Islamic State's presence in large cities in Iraq and Syria has made it hard to directly target them with airstrikes without causing civilian casualties. The United States has acknowledged killing at least 41 civilians since 2014 in thousands of airstrikes in Iraq and Syria, though human rights groups often put the figure far higher. One monitoring group, Airwars, says that more than a thousand civilians are likely to have been killed in these airstrikes.

Although the roof-knock in Mosul may not have worked as hoped, Gersten said Tuesday that the tactic may be used again. "We do everything we can to mitigate the possibility of civilian casualties but don't want to go into any additional detail about our tactics," Warren said in a subsequent email.

Thomas Gibbons-Neff contributed reporting to this story

More on WorldViews

‘Roof knocking': The Israeli military’s tactic of phoning Palestinians it is about to bomb