When you’re stressed, people often advise you to take a deep breath — and for good reason, a new study shows. Slowing your breathing calms you, and now scientists may have figured out how you can relax your brain through your breath. It has to do with your brain’s pacemaker for breath.

For anyone looking for ways to deal with stress and negative emotions, that’s big news. Although it’s been generally known that breathing exercises can have a calming affect on emotions, the researchers’ findings could provide a scientific explanation for why hyperventilation makes us anxious, or why breathing slowly can calm us down.

“It has considerable potential for therapeutic use.”

The findings stem from ongoing research on the respiratory or breathing pacemaker, a cluster of neurons in the brainstem. Called the pre-Bötzinger complex (or preBötC), it was initially discovered in mice in 1991 by study co-author Jack Feldman, a professor of neurology at UCLA. Since then, the structure has been identified and studied in humans. Feldman and study co-authors Mark Krasnow and Kevin Yackle have also identified and studied the preBötC neurons in mice that affect sighing in 2016. Their latest findings continue this research, focusing more on how these neurons affect breathing, emotional states, and alertness, which scientists call arousal.

“It’s a tie between breathing itself and changes in emotional state and arousal that we had never looked at before,” says Feldman. “It has considerable potential for therapeutic use.”

In their research, the scientists identified and studied 175 of these preBötC neurons. By eliminating these neurons in the mice, the mice’s major breathing patterns were unchanged, but they became significantly calmer. That finding led to the discovery of a link between the preBötC and another brainstem structure which affects arousal, called the locus coeruleus. In other words, they found the neural circuit that causes us to be anxious when we breathe rapidly, and calm when we breathe slowly.

The discovery was not what the scientists had initially set out to find

That discovery, however, was accidental. When the scientists started their work, they wanted to identify key neurons involved in generating the breathing rhythm, according to Yackle, the lead author of the study and a faculty fellow at the University of California-San Francisco. When they targeted these specific neurons, they expected them to be important for breathing.

“So initially I was very disappointed to find that they were not involved in generating the breathing rhythm, but then very surprised when we found that they are instead important for controlling the arousal state of the animal,” says Yackle in an email statement to The Verge. “Although in retrospect we might now appreciate that this neural circuit would exist, I would have never predicted it going into these studies.”

The ties between these neurons and brainstem structures have different practical applications. Many people already use pranayama, the meditative breathing exercises found in several varieties of yoga, in order to enter a calm emotional state. Some of us might be deliberately utilizing these pathways on a regular basis by intentionally slowing our breathing to relax ourselves.

“By changing patterns of breathing, we can change our emotional states and how we think and how we interact with the world.”

Slowing one’s breath through breathing exercises is already in use for some kinds of anxiety disorders, and has been systemized by some organizations such as Breath-Body-Mind. Led by Patricia Gerbarg, an assistant clinical professor in psychiatry at New York Medical School and author of a 2009 study on pranayama, the group has teamed up with therapists in locations such as Berlin to relieve stress, anxiety, depression, and trauma in refugees by using movement, breathing and meditative practices.

“By changing patterns of breathing, we can change our emotional states and how we think and how we interact with the world,” says Gerbarg. “That’s a very powerful tool for psychological practices.”

The newly discovered neural pathways, however, might be targets for drugs, especially for panic and anxiety disorders which can be triggered by hyperventilation, according to Yackle. By designing drugs that specifically target the place in the brain where anxiety and hyperventilation are linked, scientists may be able to help people with these disorders to lower the likelihood of panic attacks — which are typically characterized by difficulty maintaining normal breath.

Yackle plans to continue studying the breathing pacemaker region, and hopes to identify the neural types that generate breathing rhythm

Gerbarg, however, warns that much more work need to be done before the study’s findings are fully applicable to humans. In part, this is because you can’t ethically knock out nerves in humans. “It takes a few more steps to get it to a clinical matter,” says Gerbarg.

Some of these next steps might include silencing this neural circuit, and seeing if that prevents anxiety caused by hyperventilation, says Yackle. He plans to continue studying the breathing pacemaker region, and hopes to identify the neural types that generate breathing rhythm.

For many of us, the practicality of these findings boils down to having scientific evidence that confirms what we already know: our breathing is related to our emotional state, and slowing breath really can calm you down. So if you’re worried about Congress clearing the way for internet providers to sell your web browsing history, it might be time to take a few deep breaths — that way you won’t panic.