For years the United States has enjoyed almost exclusive use of armed drones, using them to strike enemies remotely and with impunity.
But with adversaries — including ISIS — catching up on the technology, the Pentagon is now playing defense, trying to come up with ways to knock the pilotless aircraft out of the sky.
Much of the U.S. military's research into fighting drones is secret. But contracting and budget documents show that officials are exploring a range of approaches, from the tried and true — machine guns — to cutting-edge technology that includes electronic jamming and laser cannons.
Maryland, with its complex of military installations, defense contractors and research universities, is in the thick of the fight.
The Johns Hopkins Applied Physics Laboratory in Laurel is working with the Navy on drone defense. Naval Air Station Patuxent River and the University of Maryland conduct research on unmanned systems, and the Maryland test site is being used this summer to figure out ways to identify drones.
Peter W. Singer, who studies warfare and technology at the Washington-based New America Foundation, compares the emergence of weaponized drones to the introduction of the tank and the atomic bomb. "This is clearly a game-changing technology," he said.
The Predator drone is an icon of the U.S. war on terrorism, a sophisticated system able to rain death on adversaries without risking American lives and a reminder of the nation's technical superiority. Last week, al-Qaida's branch in Yemen said a U.S. drone strike had killed its leader.
But the battle against the self-declared Islamic State in Iraq and Syria shows the gap starting to close. ISIS has released videos that include footage shot by drones flying high above the battlefield.
More than 80 countries are known to have obtained drones. The New America Foundation reported recently that at least eight nations, including China, Pakistan and Iran, have armed systems, and many others are working to develop them.
Only a small club of nations has used armed drones in combat: the United States, Britain, Israel and Pakistan. Singer, in a forthcoming book, explores a hypothetical future war between China and the United States in which drone combat would figure significantly.
Drones present a unique problem for military tacticians. They range from large remotely controlled aircraft such as the Navy's Triton, which is as big as a jetliner, to four-rotor helicopters that weigh a few pounds, can fly through city streets and are difficult to stop with existing weapons and tactics.
Even the smallest drone can be used to harass U.S. troops or keep them under surveillance, and because they are so cheap — Amazon sells a simple remote-controlled quadcopter, equipable with a GoPro digital video camera for $409.99 — almost anyone can field one.
At home, Americans have seen a drone zip over the heads of the Secret Service and crash on the White House lawn, and researchers fear what would happen if a drone with a chemical weapon were flown into the middle of a crowded stadium.
Conrad Grant, a researcher at Hopkins' Applied Physics Laboratory, said the wide availability of drones makes it harder to develop ways to counter them.
"These things are in everybody's hands," Grant said, "so people can be very creative in how they use them."
The military breaks down its efforts to stop a hostile drone into a series of steps that form the "kill chain."
It starts with detecting a target, then tracking and identifying it as an enemy, and finally using a weapon to stop it.
Bhavanjot Singh, an Army researcher in New Jersey, said his lab is trying to come up with a "system of systems" that can handle each step. "It's not an easy problem by any means," he said.
For the first link in the chain, major military contractors and startups alike are seeking to develop technologies to spot unmanned aircraft.
Radar can detect drones, but it has difficulty distinguishing smaller ones from birds, so it either has to be carefully calibrated or combined with other tools. One contractor has developed a system that combines radar with cameras and other sensors to pick up targets.
DroneShield, based in Alexandria, Va., started as a crowdfunded effort to give homeowners a way to maintain their privacy against cameras in the sky. Co-founder Brian Hearing said military officials and police quickly showed interest in the technology.
DroneShield works by listening for the signature sound of an approaching drone.
"They sound like an angry beehive," Hearing said. He said the system can detect drones up to 150 yards away.
Interns at the University of Maryland's Unmanned Aerial System test site in Southern Maryland plan to experiment with using microphones to pick out drones. Imraan Faruque, a faculty adviser, thinks that studying how insects identify their prey could yield insights that would be useful in hunting for drones.
He pointed to robber flies — insects that look a lot like bees but actually eat them. They are able to sense tiny differences in the appearance of other insects as they hunt for a meal and snare their prey in flight.
"We're just now starting to understand and break the code on some of the strategies that they're using," Faruque said.
Once a drone has been identified, tacticians need a way to destroy it. Each year, the military gathers its top anti-drone thinkers at a base in California for Black Dart, an exercise in which several weapons are tested against pilotless aircraft.
At a recent test, Singer said, the target was a drone bearing a similarity to one used by Iran.
"They tried to figure out: Of all the weapons we have in the inventory at the moment, which ones work?" he said.
That might mean firing an anti-air missile tailored to hit a slow-moving target. But missiles are expensive, and many drones are not.
"Cost per kill is important to us," said Singh, the Army researcher.
The Navy is experimenting with using lasers to attack drones. In 2013, the Navy released a video of a laser shooting down an unmanned aircraft. An invisible beam of light strikes the plane. Within seconds, the aircraft is crashing in flames.
After the weapon was successfully tested, officials emphasized its low cost, saying it could be fired for a dollar — far cheaper than any missile.
"Laser weapons are powerful, affordable and will play a vital role in the future of naval combat operations," said Rear Adm. Matthew L. Klunder, the chief of naval research.
Grant said that the Navy has encountered hostile drones on the battlefield and that the Applied Physics Laboratory is working with the Navy and other agencies on how to fight them.
Options include jamming communications between the drone and its operators or hacking into it online and taking over the controls. The military tested cyberattacks against drones at Black Dart for the first time last year, according to budget documents.
Faruque said it is important to have a range of options because some drones might be able to keep flying even if they lack a connection to a human on the ground and even if their GPS navigation signal is blocked.
It is also useful to have ways of disabling a drone without blowing it up, in case it is encountered in areas where the likelihood of civilian casualties is high, such as friendly airspace or an urban battlefield.
"It's not simply about: 'Can we shoot down the [drone] with a Hellfire missile?'" Faruque said.
His summer interns will be experimenting with one approach that might appeal to the cartoon character Wile E. Coyote — a cannon-launched net that would snare a drone and drag it safely to the ground.