What if belief in God and prejudice against immigrants could be altered by magnetic energy?

That’s the question researchers sought to explore in a study published Wednesday in the journal Social Cognitive and Affective Neuroscience. The “magnetic energy” comes in the form of transcranial magnetic stimulation (TMS), a noninvasive procedure that uses a metal coil to send pulses to the brain. By activating certain regions of the brain, doctors have used it for things like measuring the damage of a stroke or—increasingly—treating depression.

These researchers sought to do the opposite—to temporarily disable one part of the brain (the part that responds to threats) and measure its effect on beliefs and prejudices connected to them.

To do this, researchers from Britain’s University of York teamed up with UCLA to find 39 politically moderate college undergraduates who were divided into two groups. The first was given a “love-level sham” dose of TMS that had no effect on their brains. The second got a hit of magnetic energy strong enough to temporarily shut down their posterior medial frontal cortex. The pMFC, as this area near the forehead is known, is the part of the brain that identifies problems and—after measuring the level of threat—generates a response to them.

Testing the effect of shutting down the part of the brain that forms judgments based on threats required first presenting threats. After receiving their respective doses of TMS, participants were asked to respond to questions about their own death. Previous studies have shown the threat of death is capable of directly affecting a person’s belief in religion. Therefore, shutting down the part of the brain that registers this threat—they theorized—would reduce the need to believe in God.

A similar model was used to test group prejudice. Participants were given two letters written by immigrants—one that commended the U.S., another that criticized it. The text was borrowed from a study in which the negative example was shown to “intensify ethnocentric bias.” Much like the religion model, researchers hypothesized that the group with a temporarily suspended pMFC would be less influenced by the threat of the negative letter, and thus less critical of that immigrant.

In both cases, their predictions rang true. In the participants whose pMFC was temporarily shut down, 32.8 percent fewer expressed belief in God, angels, or heaven. Some 28.5 percent more displayed a positive response toward the immigrant who was critical of America, compared with the control group.

The University of York’s Keise Izuma says the study was fairly straightforward. “People often turn to ideology when they are confronted by problems,” says Izuma. “We wanted to find out whether a brain region that is linked with solving concrete problems, like deciding how to move one’s body to overcome an obstacle, is also involved in solving abstract problems addressed by ideology.”

The decision to remind people of death, he says, was motivated by previous research on people’s habit of seeking out comfort in religion when presented with death. “As expected, we found that when we experimentally turned down the posterior medial frontal cortex, people were less inclined to reach for comforting religious ideas, despite having been reminded of death,” he said.

The immigration questions revolved around a less-concrete threat. “We think that hearing criticisms of your group’s values, perhaps especially from a person you perceive as an outsider, is processed as an ideological sort of threat,” says Izuma. “One way to respond to such threats is to ‘double down’ on your group values… and [react] more negatively to the critic. When we disrupted the brain region that usually helps detect and respond to threats, we saw a less negative, less ideologically motivated reaction to the critical author and his opinions.”

TMS is nothing new. According to a paper from the Journal of Psychiatry and Neuroscience in 2003, the practice was designed to “noninvasively activate nerve cells through the scalp.” Its use dates back to the late 1800s, when the French physicist Arsenne d’Arsonval succeeded in using the practice on the retina to induce phosphenes—the sensation of seeing light without light actually being present.

A number of studies on the success in treating depression with the procedure have emerged. In 2013, thanks to this research, four major health-care companies began covering it as an official treatment for drug-resistant depression.

Individuals, too, have expressed their success with the treatment, including Martha Rhodes, who was 61 years old when she tried it. The procedure didn’t just help Rhodes, who suffered from lifelong, debilitating depression; it saved her—or so she writes in 3,000 Pulses Later, the book she penned about her experience.

While the therapeutic benefit of TMS is fairly well known, its ability to alter prejudice and belief remains more of a mystery. Izuma’s new study provides an interesting look at this as a possibility, but it is far from conclusive. With an extremely small sample size, it’s impossible to tell whether or not it was the only influencer.

UCLA’s Colin Holbrook—the lead author of the paper—says that, if nothing else, it’s a good first step. “These findings are very striking, and consistent with the idea that brain mechanisms that evolved for relatively basic threat-response functions are repurposed to also produce ideological reactions,” says Holbrook. “However, more research is needed to understand exactly how and why religious beliefs and ethnocentric attitudes were reduced in this experiment.”