LIKE so much else in science fiction, the ray gun was invented by H.G. Wells. In the tentacles of Wells's Martians it was a weapon as unanswerable by earthlings as the Maxim gun in the hands of British troops was unanswerable by Africans. Science fiction, though, it has remained. Neither hand-held pistols nor giant, orbiting anti-missile versions of the weapon have worked. But that is about to change. The first serious battlefield ray gun is now being deployed. And the next generation, now in the laboratory, is coming soon.

The deployed ray gun (or “directed-energy weapon”, in the tedious jargon that military men seem compelled to use to describe technology) is known as Zeus. It is not designed to kill. Rather, its purpose is to allow you to remain at a safe distance when you detonate unexploded ordnance, such as the homemade roadside bombs that plague foreign troops in Iraq.

This task now calls for explosives. In practice, that often means using a rocket-propelled grenade, so as not to expose troops to snipers. But rockets are expensive, and sometimes miss their targets. Zeus is effective at a distance of 300 metres, and a laser beam, unlike a rocket, always goes exactly where you point it.

At the moment, there is only one Zeus in the field. It is sitting in the back of a Humvee in an undisclosed theatre of war. But if it proves successful it will, according to Scott McPheeters of the American army's Cruise Missile Defence Systems Project Office for Directed Energy Applications, be joined by a dozen more within a year.

You fight with light?

If Zeus works, it will make soldiers' lives noticeably safer. But what would really make a difference would be the ability to destroy incoming artillery rounds. The Laser Area Defence System, LADS, being developed by Raytheon, is intended to do just that—blowing incoming shells and small rockets apart with laser beams. The targets are tracked by radar and (if they are rockets) by infrared sensors. When they come within range, they are zapped.

If it works, LADS will be a disruptive technology in more senses than one. It will probably supersede Raytheon's Phalanx system, which uses mortars to do the same thing. Phalanx and its competitors require lots of ammunition, and can be overwhelmed by heavy barrages. By contrast, Mike Booen, vice-president of Advanced Missile Defence and Directed Energy Weapons at Raytheon, observes, as long as LADS is supplied with electricity it has “an infinite magazine”.

And LADS is merely the most advanced of a group of anti-artillery lasers under development. Though Raytheon is convinced it is on to a winner and is paying for most of the development costs out of its own pocket, it has received some money from the Directed Energy Weapons Programme Office of the American navy. In August, inter-service rivalry reared its head, when the army handed Boeing a $36m contract to develop a similar weapon, known at the moment as the High Energy Laser Technology Demonstrator.

The army's Space and Missile Defence Command is also in the game. Its Joint High Power Solid State Laser, a prototype of which should be ready next summer, is meant to destroy rockets the size of the Katyushas used by insurgents in Afghanistan and Iraq, and by Hizbullah in Lebanon.

The most ambitious laser project of all, though, is the Airborne Laser, or ABL, being developed by the American Missile Defence Agency and Boeing, Lockheed Martin and Northrop Grumman. The beam is generated by mixing chemicals in a reactor known as a COIL (chemical oxygen iodine laser) and packs a far bigger punch than the electrically generated beams emitted by systems such as LADS. When mounted in the nose-cone of a specially converted Boeing 747, an ABL should be capable of disabling a missile from a distance of several hundred kilometres.

The aim is to hit large ballistic missiles, including ICBMs, just after they are launched—in the boost phase. The ABL is therefore a son of Ronald Reagan's Star Wars scheme, although in that programme, which dates back to the 1980s, the lasers would have operated from space.

There are many advantages to attacking a missile during its boost phase. First, it is still travelling slowly, so it is easier to hit. Second, it is easy to detect because of its exhaust plume (once the boost phase is over, the engine switches off and the missile follows Newton's law of gravity to its target). Third, if it has boosters that are designed to be jettisoned, it will be a larger target when it is launched. Fourth, any debris will fall on those who launched it, rather than those at whom it was aimed.

Getting the system to work in practice will be hard, though. A missile launch is observed using an infrared detector. Then the missile must be tracked. When the beam fires, the control system must compensate both for aircraft jitter and for distortions in the beam's path caused by atmospheric conditions. And ABL-carrying planes must be in the right place at the right time in the first place. Even so, a number of tests have been carried out, and according to Colonel Robert McMurry, the head of the Airborne Laser Programme Office at Kirtland Air Force Base in New Mexico, there will be a full-scale attempt to shoot down a boost-phase missile off the coast of California next summer.

All of which is good news, at least for countries able to deploy the new hardware. But wars are not won by defence alone. What people in the business are more coy about discussing is the offensive use of lasers. At least one such system is under development, though. The aeroplane-mounted Advanced Tactical Laser, or ATL, another chemical laser being put together by Boeing and the American air force, is designed to “neutralise” targets on the ground from a distance of several kilometres. Targeting data will be provided by telescopic cameras on the aircraft, by pictures from satellites and unmanned aerial drones, and by human target-spotters on the ground. The question is: what targets?

The ATL's supporters discuss such possibilities as disabling vehicles by destroying their wheels and disrupting enemy communications by severing telephone lines. Killing troops is rarely mentioned. However, John Pike, the director of GlobalSecurity.org, a military think-tank in Alexandria, Virginia, who is an expert on ATL, says its main goal is, indeed, to kill enemy combatants.

Surely this is forbidden?

Boeing is unwilling to discuss the matter and John Wachs, the head of the Space and Missile Defence Command's Directed Energy Division, observes that it is “politically sensitive”. The public may have misgivings about a silent and invisible weapon that would boil the body's fluids before tearing it apart in a burst of vapour.

That seems oddly squeamish, though. War is not a pleasant business. It is doubtful that being burst by a laser is worse than being hit by a burst from a machine gun. As the Sudanese found out at the Battle of Omdurman in 1898, the year that “The War of the Worlds” was published, that is pretty nasty too.