In the Harry Potter film series, the main character learns how to recall specific memories by simply pulling them out of his head individually with a magic wand.

Now scientists in the real world say shock therapy --- applying electrical currents to one's brain --- may prove a true magic wand, a way to erase unwanted memories, and perhaps rehabilitate those suffering the psychological wounds of traumatic events.

Currently accepted theories about memory formation suggest people have a small time gap from when they form a memory and afterward store it for later recall. And it's during that lag that scientists believe electroconvulsive therapy (ECT), or shock therapy, can be applied to interrupt the reconsolidation process, either erasing a memory or filling memory space with an implanted one.

According to a recent study published in the journal Nature Neuroscience, 42 test subjects showed positive responses to the new therapy.

In order to test their theory, the researchers showed two disturbing slideshow narratives and soon afterward asked some of the subjects to recall one of the narratives. A multiple choice test, given to both the control and ECT subjects 90 minutes after the slideshow, the two groups did equally well.

But, then the scientists administered ECT and a day later, when the same participants were asked to remember the same slideshow, they couldn't.

Those results seemed to indicate, the study said, that memory details were lost in the storage process, not immediate recall, meaning ECT stopped long-term memories from forming, instead of blocking a memory from forming altogether. That insight revealed memory reconsolidation happens in a time-dependent window.

"This provides very strong and compelling evidence that memories in the human brain undergo reconsolidation, and that a window of opportunity exists to treat bad memories," Daniela Schiller, a neuroscientist at Mount Sinai Hospital in New York who studies memory reconsolidation, said in a news release.

The researchers, led by Dutch researcher Marijn Kroes, a neuroscientist at Radboud University Nijmegen in the Netherlands, assert their findings could bring far-reaching changes to how patients with severe mental illnesses are treated.

Though ECT has in the past been considered a controversial, if not crude, method of treatment, modern researchers believe it nonetheless show extreme promise as an approach of last resort.

Jan-otto Ottosson, a professor of psychiatry and expert on medical ethics, says in the publication Psychiatric Times that ECT may be controversial, but it is an application capable of adhering to the three principles of ethical medicine: do good, do no harm, and have respect for personal autonomy and justice.

"Many randomized clinical trials crystallize the indications for ECT where its efficacy is unsurpassed by other treatments," Ottosson wrote. "The effective indications are major depression, especially its psychotic form, and catatonia, especially its malignant form. Electroconvulsive therapy also relieves severe mania and some forms of schizophrenia. The risk of suicide decreases after ECT. In these conditions, ECT complies with the principle of beneficence."

So far, Kroes noted, the memory deletion process is still years in the future, but it demonstrates new ways to care for the mentally impaired.

"The ability to permanently alter these types of memories might lead to novel, better treatments," he said.