A new study found that religious thoughts and sex, gambling, love and music are tied to the same “reward” center of your brain.

The report, written by researchers from the University of Utah School of Medicine, was published on Tuesday in the journal Social Neuroscience.

The study found that spiritual feelings were associated with the nucleus accumbens, a brain region for processing reward.

In addition to the reward circuits, researchers found that spiritual feelings were associated with the medial prefrontal cortex, a brain region activated by tasks involving valuation, judgment and moral reasoning, according to the study authors. Spiritual feelings also activated brain regions associated with focused attention.

“We’re just beginning to understand how the brain participates in experiences that believers interpret as spiritual, divine or transcendent,” senior author Dr. Jeffrey Anderson said. “In the last few years, brain imaging technologies have matured in ways that are letting us approach questions that have been around for millennia.”

Researchers performed fMRI scans on 19 young-adult members of the Church of Jesus Christ of Latter-Day Saints to see how religion affects the brains of deeply devout Mormons.

Researchers created an environment hoping to trigger participants to “feel the Spirit,” or a peace and closeness with God. During the scans, the seven women and 12 men were asked to perform four tasks to invoke spiritual feelings.

“When our study participants were instructed to think about a savior, about being with their families for eternity, about their heavenly rewards, their brains and bodies physically responded,” said lead author Michael Ferguson, who carried out the study as a bioengineering graduate student at the University of Utah.

To read the full study, click here.