Bad language could be good for you, a new study shows. For the first time, psychologists have found that swearing may serve an important function in relieving pain.

The study, published in the journal NeuroReport, measured how long college students could keep their hands immersed in cold water. During the exercise, they were told to repeat an expletive of their choice or to chant a neutral word. The 67 volunteers who cursed reported less pain and endured the iciness for about 40 seconds longer on average.

“Swearing is such a common response to pain that there has to be an underlying reason why we do it,” says psychologist Richard Stephens of Keele University in England, who led the experiment. And indeed, the findings point to the possible benefit of pain reduction. “I would advise people, if they hurt themselves, to swear,” Stephens adds.

One of the first clues that swearing is more than mere language came from a 1965 brain surgery performed at the Omaha Veterans Administration Hospital in Nebraska. To eradicate a growing tumor in a 48-year-old man, doctors split his brain in half—slicing through a thick bridge of nerve fibers—and removed his entire cancer-ridden left hemisphere. When the patient awoke, he found his ability to speak had been devastated. He could utter only a few, isolated words with great effort—hardly surprising because language relies largely on the left half of the cortex. But as he realized his verbal shortcomings, he let out a perfect string of curses.

Other findings have since confirmed that people with left-hemisphere injuries that ruin speech may nonetheless maintain a first-rate arsenal of profanities. Conversely, a stroke in certain areas buried deep in the right hemisphere usually spares normal language but may leave the afflicted person unable to use meaningful swearwords. Although the details are murky, bad language seems to hinge on evolutionarily ancient brain circuitry with intimate ties to structures that process emotions.

One such structure is the amygdala, an almond-shaped group of neurons that can trigger a fight-or-flight response in which our heart rate climbs and we become less sensitive to pain. Indeed, the Keele students’ heart rates rose when they swore, a finding Stephens says suggests that the amygdala was activated.

That explanation is backed by other experts in the field. Psychologist Steven Pinker of Harvard University, whose book The Stuff of Thought (Penguin, 2008) includes a detailed analysis of swearing, compared the situation with what happens in the brain of a cat that somebody accidentally sits on. “I suspect that swearing taps into a defensive reflex in which an animal that is suddenly injured or confined erupts in a furious struggle, accompanied by an angry vocalization, to startle and intimidate an attacker,” Pinker says.

But cursing is more than just aggression, explains Timothy Jay, a psychologist at the Massachusetts College of Liberal Arts who has studied our use of profanities for the past 35 years. “It allows us to vent or express anger, joy, surprise, happiness,” Jay remarks. “It’s like the horn on your car—you can do a lot of things with it. It’s built into you.”

There is a catch, though: the more we swear, the less emotionally potent the words become, Stephens cautions. And without emotion, all that is left of a swearword is the word itself, unlikely to soothe anyone’s pain.