Image caption The design may lead to shields that protect pacemaker wearers during MRI scans

Researchers have designed a "cloak" that is invisible to magnetic fields both coming in and coming out.

The idea of blocking magnetic fields has been proposed before, but the new design, in the New Journal of Physics, could even hide magnetic materials.

It could thus find application in security or medical contexts, such as those surrounding MRI scans.

The approach uses superconductor layers and the "metamaterials" familiar from recent invisibility cloak research.

Metamaterials are artificially designed materials designed to guide electromagnetic waves - like light or magnetic fields - in a way that natural materials do not.

Much research in recent years has attempted to put metamaterials to work in Harry Potter-style invisibility cloaks that guide light waves around a cloak's wearer - although experiments have only demonstrated such effects on tiny items, or for a limited range of colours.

But because light and magnetism are two facets of the same physical force, many of the same principles apply for demonstrating a magnetic cloak, as the report's lead author Alvaro Sanchez explained.

"Magnetism has been very important in technology for the last 150 years," Prof Sanchez told BBC News. "We know very well how to create magnetic fields, but we don't know how to cancel them in a given space region."

Metal undetector

Prof Sir John Pendry, widely regarded as a founding theorist in the metamaterial field, demonstrated in a 2008 paper in Nature Materials that the ideas behind making objects invisible to light could be put to use hiding magnetic fields as well.

"We realised that these ideas were very interesting but a final device was not there - only the general concept," Prof Sanchez explained.

He and his colleagues at the Autonomous University of Barcelona in Spain thus set about coming up with a design for such an antimagnet.

Image caption It may prove to be comparatively simple to use the same ideas to trick metal detectors

Their idea is to use an inner cloak of superconducting material, surrounded by layers of metamaterials whose response to the magnetic field varies in a prescribed way through the thickness of the cloak.

Ortwin Hess, professor of metamaterials at Imperial College London, called the work "a refreshing extension" of the theoretical ideas laid out in previous work.

"Its emphasis lies on presenting a way how to make the scheme more practical by increasing its simplicity," he told BBC News, though both he and Prof Sanchez agree that some challenges remain in the production of the actual materials.

"What it offers in addition to the previous scheme is the fact that it also cancels, by adding a simple superconducting layer, possible magnetic fields that may be emitted from a magnet inside the magnetic cloak," he added, which means that such an antimagnet could hide any objects, even magnetic ones.

The team is now working to produce a working model of such an antimagnet, which Prof Sanchez said may eventually find application in allowing pacemaker or implant wearers to undergo MRI scans, or in a number of energy generation scenarios in which magnetic fields play a large part.

What is more, the idea could be put to use in hiding the "magnetic signatures" of submarines to evade detection or underwater mines, or even to trick metal detectors.

"We now know how to make an antimagnet that exactly cloaks a magnetic field - it's something difficult that can be done in some high-tech labs, but to reduce the magnetic signature of something that you want to pass through a metal detector such that it becomes undetectable is much less demanding," Prof Sanchez said.

"We have so much security based simply on metal detectors, based on magnetic signals, I think this is something officials may start thinking about."