FOR America's Central Intelligence Agency, the glory days of its “Darwin” patrols in Iraq were short-lived. Following the defeat of Saddam Hussein in 2003, the American-led forces faced clever homemade bombs triggered with the remote controls used to open garage doors. So CIA agents drove around transmitting garage-opening signals to blow up any bombmakers who happened to be nearby. This “survival of the fittest” culling, which gave the scheme its nickname, quickly became less effective when the bombers came up with new and better detonators. “We had to keep going back to the drawing board,” says a former senior CIA official.

And still the battle continues, with each new bombing advance met by a new countermeasure. As insurgents and terrorists have improved their handiwork, improvised explosive devices (IEDs) have become their most lethal weapons. In Iraq, IEDs are responsible for two-thirds of coalition deaths. In Afghanistan such attacks have roughly tripled in the past two years.

The bombmakers' skills spread rapidly. Thierry Vareilles, a retired colonel in the French army who led bomb-squad missions in a dozen countries, says as soon as one group has come up with “hoax” wiring designed to trick bomb-disposal experts, even distant groups soon start using the treacherous configurations. International travel and the internet help distribute ideas and designs, and not just among groups that share the same ideology.

The right signal

After garage-door triggers, bombers switched to using mobile-phone components to trigger detonators—and from a greater distance. Next, because mobile-phone signals can be randomly delayed or jammed, they turned to long-range cordless phones which do not pass through a telecoms network. Some jamming equipment can scramble these signals, as well as those from mobile phones, but the best kit devours battery power and costs more than €100,000 ($140,000). Also, jamming sometimes wrecks a security force's own communications, a predicament known as “electronic fratricide”.

Switching tactics again, the bombmakers reverted to simple triggers that avoid signals altogether. Cheap light sensors can detonate a bomb in a dark room when a door is opened. Colombian terrorists make bombs that detonate when a foot pushes down a concealed syringe that connects a battery-powered circuit. As John Adams, a colonel working at America's National Security Agency (NSA), puts it: “We're always one step behind them.”

Rudimentary “contact” detonators, using two wires or metal plates that are pushed together, are now common in Afghanistan, Iraq and elsewhere. American forces fitted some vehicles with extra wheels that protrude from the front (explosions ahead of a vehicle are less destructive than underneath it). But insurgents started placing contact triggers a few meters beyond the bomb. Using powerful vehicle-mounted air blasters, soldiers can search for contact wires by blowing away leaves, sand and soil. But it is not fail-safe.

BAE Systems, a British defence firm, is devising an alternative. It uses a vehicle-mounted camera, object-recognition software and satellite positioning to create detailed 3-D maps of roads, pinpointing features such as pot-holes. When vehicles subsequently pass along the same road the system can spot any new features, such as a rubbish heap or anything else that might hide a bomb. James Baker of BAE, who is working on the project, says defeating IEDs is now the operational priority for Britain's defence ministry.

Many explosives are made of volatile compounds that readily release particles into the air. Equipment that can sniff these vapours could help find bombs. Lynntech, a company based in Texas, is working on a hand-held sniffer which is expected to cost about $20,000 when it is ready in about three years. It uses a small spectrometer to bounce infrared light off particles in the sample. By analysing the wavelengths of the reflected light it can identify specific chemicals. The company plans to fit these sniffers on airborne drones, too.

At least this technology has some foundation in science. A few years ago an east European company offered the American army a device that resembled a car antenna on a fancy handle. “The story went that somehow this rod and your body generated static electricity” and the antenna would twitch if pointed toward explosives, says a colonel who tested equipment in Baghdad. Once it became clear that this claim would be tested, the vendor was never heard of again.

Nevertheless, wands of this sort became widely used in Iraq and beyond. According to one tally, the Iraqi government purchased more than 1,500 of them from one company at $16,500-60,000 each. It has since emerged that explosives that killed more than 150 people in Baghdad on October 25th 2009 had probably been smuggled through a checkpoint equipped with these wands. Britain recently banned exports of such devices and arrested a businessman who was selling them.

Discovering IEDs, however, is not enough; they must then be neutralised. Robots can move them and place explosives to blow them up. But many robots are too big and heavy to be carried by soldiers on foot. QinetiQ, a British firm which makes the widely used Talon robot (pictured above), has a new lightweight back-packable version called Dragon Runner. It costs more than $150,000.

An alternative is to zap an IED with a laser. The Laser Avenger, which is being developed by Boeing, is a vehicle-mounted system that can slowly heat explosive material from several hundred metres. This can eventually cause a bomb to explode, but with less than half of its usual force.

An improvised explosive device

A simpler contraption has been crafted by the leader of a bomb squad in Cotabato City in the Philippines. Francis Señoron, an army captain, has built “IED disrupters” out of small blasting caps and a water canister the size of a beer can. When positioned close to a device and detonated remotely with a wire, the canister squirts water into the circuitry of the device to short it out. Curious American officials have asked for more details, but Captain Señoron, who hopes to patent his innovation, is keeping it under wraps for now.

Better blast protection helps, too. Mine-resistant ambush-protected vehicles (MRAPs) have V-shaped underbellies to deflect blasts outward. In 2008 America spent more than $16 billion on MRAPs, according to Visiongain, a market-research firm based in London. But some MRAPs weigh more than 30 tonnes, are unwieldy to drive and can damage roads.

A new generation of MRAPs is on its way. These feature suspended seats to protect riders from shock waves below. The Ocelot, an MRAP built by Force Protection of South Carolina, is made from lighter and stronger steel. At only a quarter of the weight of some vehicles, it also has a new and more effective V-shaped hull and a removable “crew pod” that allows more of a bombed vehicle to be salvaged.

Kevlar airbags may eventually provide even better protection. Survival Consultants International, a small Florida company, is using several layers of Kevlar and other tough materials to design external airbags that would inflate nanoseconds after a blast and absorb some of its force.

Yet as vehicles get tougher, the blasts get fiercer. Already in Afghanistan, Iraq and Pakistan makeshift “explosively formed projectiles”—disks of copper or other metals that are shaped by a blast into a hurtling lump—can smash through some of the toughest armour.

American soldiers in Afghanistan remotely control a bomb-defusal robot

An endless war?

Can technology really win the fight against IEDs? The bombmakers' equipment may appear to be relatively crude, but it is cunning enough to stymie counter-IED systems, admits Wayne Shanks, a spokesman for NATO's International Security Assistance Force in Kabul. Yet Colonel Adams of the NSA sees something that could tip the balance in the army's favour: predictive-analysis software.

Computers are good at determining how myriad variables might affect events. Bombs, for example, are more likely to be planted in damp ground on dark moonless nights in areas where opposition is high. Bombers tend to communicate frequently with certain clerics, drive slowly through potential attack zones and return home without having got out of their cars. Separately these things mean little, but by combining data from hundreds of different sources, software can calculate how probable it is that IEDs have been placed and possibly the area where they are.

Richard Rowe, an American major general in Baghdad, says predictive software is already helping identify terrorists. For example, he says, bombmakers could be spotted if they rent apartments near potential targets to bring apparently harmless IED ingredients past checkpoints, rather than completed bombs.

Capturing or killing bombers may, however, reduce attacks only briefly. The reason for this, says Kenneth Comer, deputy director of intelligence at the Joint IED Defeat Organisation, an American defence agency, is that taking them out of circulation can actually strengthen terror networks by encouraging the remaining members to jostle for power and experiment with new and more lethal techniques. Predictive analysis, he says, often appears to serve as an “evolutionary algorithm” that replaces the weak with others who may be even more capable. If such “survival of the fittest” is really going on, then the technological leap-frogging in the IED war will sadly continue—and only a political settlement will end it.