When she was embedded with Iraqi soldiers in Mosul last fall, researcher Vera Mironova says the Islamic State regularly buzzed her unit with camera-equipped drones to record information on troop movements.

In one instance, two drones hovered above the patrol, causing nearly 100 soldiers to open fire, says Ms. Mironova. Only one of the drones fell to the ground in the barrage.

“There is no other way to take them down,” says Mironova, an international security fellow at the Harvard Kennedy School’s Belfer Center who traveled to Mosul to conduct field research.

Over the past 90 days, US officials say they have spotted 92 enemy drones, most of which are off-the-shelf models outfitted with cameras or explosives. Drones have killed and injured local and western forces, though it's unclear how many. In October, drones killed two Kurdish fighters and injured two French commandos.

The arrival of consumer-grade drones on the Iraqi battlefield makes the fight against the Islamic State the first major conflict in which all sides rely on unmanned aircraft. Going forward, the US military may never face another military adversary without its own fleet of drones and autonomous weapons.

Now, American and local forces are scrambling to come up with new ways of fighting back against drones, testing weapons and technologies on the battlefield to thwart the growing aerial menace.

“This commercial, off-the-shelf drone capability that they have is much less damaging, much less effective [than other ISIS tactics like car bombs] but it is also something that’s more difficult to do something about,” says US Air Force Col. John Dorrian, spokesman for the US-led coalition fighting the Islamic State in Iraq.

Though a handful of defense companies are developing antidrone weapons, none of their innovations have seen widespread adoption. Most operate as jammers, disrupting the signal between the drone and its operator. One of these drone guns, the DroneDefender appeared in a photo that was reportedly taken on a US base in Iraq. Neither the military nor the manufacturer, Battelle, can comment on the specific types of drone countermeasures currently used in Iraq.

Designed to look and feel like a rifle, the DroneDefender fires an electronic signal that can force a drone to return to its owner, hover in place or land. In a little more than a year, Battelle has sold more than 100 of the devices to the Department of Defense, Department of Homeland Security, and a foreign military organization.

“These are kind of early days and we’re seeing what drones can do and how they’ll be used,” says Katy Delaney, a spokesperson for Battelle. The Ohio-based company does not disclose the cost of the DroneDefender due to business sensitivity issues but says it is considered "affordable" in the "competitive landscape."

Although products like the DroneDefender may be new to the market, nonstate actors have been using unmanned aircraft for more than a decade. As early as 2004, Hezbollah sent an Iranian-made unmanned aircraft into Israeli airspace. During the 2006 Lebanon War, the militant group flew a drone rigged with explosives into an Israeli warship.

Since then, low-cost consumer drones have become nearly ubiquitous. In the US, the Federal Aviation Administration had registered more than 325,000 drones compared to 320,000 piloted aircraft by early last year. Now there are more than 670,000 registered drones and the FAA estimates that there could be as many as 7 million by 2020.

“The threat that runs through all of this is lower barriers to entry,” says Peter Singer, a senior fellow and strategist at New America, a Washington-based think tank, and author of "Wired for War: The Robotics Revolution and Conflict in the 21st Century."

“We can reasonably project ten years out that robotic systems are going to be even more widely available but also simpler, easier to use and more autonomous," he says.

On the home front, these drones may prove just as much a threat as they do on the battlefield, delivering drugs and contraband to inmates. In one such instance in London, a quadcopter brought a sack of drugs and cellphones directly to the window of a prison cell.

A team of Canadian and Israeli researchers published a paper this fall about how they used a drone to remotely hack and control smart light bulbs, demonstrating how unmanned aerial vehicles could wreak havoc on the internet-connected electronics. And almost two years ago, a Connecticut teenager built a quadcopter capable of firing a mounted handgun.

“Three years ago you had to convince [perspective clients] that it was going to be a threat. It was more theoretical,” says Josh Desmond, vice president of business development at DroneShield. His company makes unmanned aircraft detectors and an antidrone gun.

“Now it’s more that people want to talk to us. There’s no convincing them that it’s going to be a threat. It already is,” he says.

Detectors are legal in the US but makers of antidrone weapons are prohibited from selling their equipment to anyone other than the federal government. That's because the jammers may also block telephones and radios, a violation of Federal Communications Commission regulations.

Some laws affecting drone countermeasures date back almost a century, says Jonathan Rupprecht, an attorney focused on drone law. He says the Federal Communications Act of 1934 prohibits anyone from manufacturing or even marketing an unlicensed jammer in the US.

“We may need to start adapting quickly and maybe have some specific provisions … that say you can operate said drone countermeasure,” he says.

For those worried that America now faces a new threat, security analysts say that automated technologies are most likely concerning because they’re new.

“New technologies come along and they give new options to terrorists and criminals,” New America's Mr. Singer says. “For a regular American, if you’re worried about someone shooting up your kid’s school, unfortunately we don’t have to wait for a world of robots to know that’s a real danger.”