Ghostly apparitions and hauntings have pervaded folklore and legend for thousands of years, but now scientists have shown that they are just a figment of the imagination.

Artificial ‘spectres’ were conjured up by an experiment which proved so disconcerting for participants that two begged for it to stop.

Scientists have long suspected that ghosts are an illusion created by the mind. Patients who suffer from neurological or psychiatric conditions often report ‘strange presences.’

And people experiencing extreme physical or emotional pain often claim to have seen ghostly outlines or felt that departed loved ones were back in the room with them.

Now, however, scientists in Switzerland have shown that ghosts are probably just an illusion created by the mind when it momentarily loses track of the body’s location because of illness, exertion or stress.

Volunteers took part in an experiment which mixed up their movements and brain signals.

They saw up to four phantoms positioned around them and believed that ghosts were touching their backs with invisible fingers.

Professor Olaf Blanke, from the Ecole Polytechnique Federale de Lausanne (EPFL) in Switzerland, said: "Our experiment induced the sensation of a foreign presence in the laboratory for the first time.

“It shows that it can arise under normal conditions, simply through conflicting sensory-motor signals.