It won't help you sneak around Hogwarts without being seen or let you stalk the USS Enterprise just yet, but scientists have unveiled the world's first cloaking device, using technology designed to make solid objects vanish from sight.

Cloaking devices are keenly awaited and coveted by the military, which believes they will usher in a new age of stealth technology by hiding planes and other vehicles from radar. More advanced versions could ultimately be good enough to make objects or people invisible to onlookers.

The prototype was built and demonstrated in America by a team of US and British scientists only five months after proving it was theoretically possible to pull off the most famous of optical illusions, without breaking the laws of physics.

The device works on the principle that an object vanishes from sight if light rays striking it are not reflected as usual, but forced to flow around it and carry on, as if it was not there. To make cloaks, scientists developed "metamaterials", meticulously patterned thin metal sheets that can bend light in precisely the right way.

In the demonstration, scientists showed that a small object surrounded by rings of metamaterials in effect disappeared.

The test involved firing a beam of microwaves at the object, the same radiation used for radar.

Normally the beam would penetrate and bounce off the rings, but measurements showed the waves split and flowed around the centre. "The wave's movement is similar to river water flowing around a smooth rock," said David Schurig, a scientist at Duke University who helped conduct the experiments.

At present, although the angular lines of stealth bombers make them hard to spot on radar screens, they can leave a "shadow" that gives away their position. The military hopes that cloaking devices could render them almost completely invisible.

Sir John Pendry, the theoretical physicist at Imperial College London, who developed the idea, said cloaking devices to hide vehicles from radar were only a matter of years away.

"It's already been quite an achievement designing this cloak, but next we want to develop a thin skin that can cloak a plane without interfering with the aerodynamics. If you wanted to cloak something big and clunky like a tank, that's feasible in the medium term," he said.

A cloaking device that makes objects invisible to the eye is a tougher prospect.

Radar waves are about 3cm long and to cloak objects from them, metamaterials need to be designed with features a few millimetres across. Visible light waves are far shorter - less than one thousandth of a millimetre - meaning a cloaking device would need metamaterials with much finer features to bend light properly.

"It's not yet clear that you're going to get the invisibility that everyone thinks about with Harry Potter's cloak or the Star Trek cloaking device," said David Smith, who led the experiments at Duke University.

While scientists have high hopes for invisibility devices, they are less optimistic they will ever be able to challenge Harry Potter's stealth garment. "Our device is more an invisibility shed than an invisibility cloak," said Prof Pendry, whose research appears today in the journal Science.

Scientists praised the work yesterday. "This is the first practical demonstration of something close to a cloaking device and that is highly impressive," said Ulf Leonhardt, a theoretical physicist at St Andrews University. "It's a dream to be able to see and not be seen that runs far back through history. Vision is our basic sense, and invisibility is an optical illusion that's incredibly powerful and fascinating."

Dr Leonhardt said the technology behind cloaking devices was so powerful it would quickly be picked up by other scientists and used in other ways.

"This technology is extremely versatile. If you wanted to concentrate electromagnetic waves in one place, you could do that," he said. "If you wanted to shield something from electromagnetic pulses you could do that too. Invisibility is just the tip of the iceberg."

Vanishing acts

The dream of invisibility has enthralled people for millennia, stretching from Perseus's ancient encounter with Medusa to Harry Potter via the Romulans, James Bond and the half-hearted attempt by Predator in the eponymous film starring the governor of California.

In fiction, caps, rings, cloaks or dubious injections are invoked to help a character disappear without trace, in the case of the Paul Verhoeven film The Hollow Man, organ by organ, and in the case of the German tarnkappes (magical caps), by hordes of dwarves at a time.

Most recently Harry Potter was able to disappear under an enchanted cloak.

But in some cases at least, where fiction leads, fact has tried to follow. The invisible woman became so by bending light around herself, the same concept used in the rudimentary cloaking devices being built today. If light is bent around an object instead of bouncing off it, an onlooker will see nothing.

In the Hitchhiker's Guide to the Galaxy, Douglas Adams extended the desire for invisibility from people to problems, with the "Somebody else's problem field", which banishes worries by rendering objects inside it someone else's concern.