Mental distractions can act as a form of pain relief, according to a new study.

Study volunteers were asked to complete a difficult or easy memory task while a painful level of heat was applied to their arms. The participants perceived less pain when they were more distracted by the harder of the two memory tasks.

Using functional MRI, the German researchers also found that the lower levels of pain were associated with reduced activity in the spinal cord.

The study appears May 17 in the journal Current Biology.

The findings show that the reduced pain associated with distraction isn't just a mental process, but also a physical mechanism that reduces the amount of pain signals traveling from the spinal cord to the brain, said study author Christian Sprenger of the University Medical Center Hamburg-Eppendorf.

Read more from U.S. News.