The symptoms experienced during both a workout session and a panic attack are surprisingly similar. Their relationship is closer than you may have thought.

Aside from improving your cardiovascular, muscle, and bone health (to name a few), working out regularly also offers a surplus of mental health benefits, including reduced anxiety and stress levels.

“Research has shown that exercise can be a remedy for anxiety and calms the sensory nervous system, produces endorphins [the ‘feel-good’ hormone], and lowers your resting heart rate,” says Dr. Andreas Michaelides, chief of psychology at Noom in New York City.

However, a zealous exercise session can have the opposite outcome for some, inducing feelings of anxiety and even triggering full-blown panic attacks.

So what’s behind this, and how can you help keep the endorphins and ditch the escalation?

Sort of. While the physical act of exercise itself doesn’t directly induce panic attacks or anxiety, the ripple effects that follow can.

If you’ve experienced a panic attack, you’re well aware of some of the symptoms — sweating, increased heart rate, shortness of breath, dizziness, and nausea. Many of these can also arise after cardio or high intensity interval training (HIIT) workouts.

Sensing signs of a panic attack while exercising can cause anxiety and stress for some. But what’s the science behind it?

“Exercise, particularly strenuous exercise, can stimulate our bodies’ own defense system or fight-or-flight response,” says Dr. Jeffrey Ditzell, a psychiatrist in New York City.

“Panic attacks are… defined as a physiologic over-response to what might be considered normal physiologic stress. Exercise-induced panic can be experienced as one increases the intensity of effort, stimulating our sympathetic nervous system to prepare to flee or to fight,” Ditzell says.

Once physical symptoms of panic start, inner turmoil can awaken and exacerbate the experience.

“There may be fears that something specific and feared will happen. For example, that they will collapse, faint, die, wet themselves, be humiliated,” explains Dr. Marianne Trent, an author and clinical psychologist in Coventry, U.K. “This continues to trigger the physical symptoms.”

As a result, it can quickly become a vicious cycle.

A 2009 German-based study noted that those with an underlying anxiety-related or panic disorder have a higher risk of experiencing panic-related symptoms during or after a workout.

“Panic usually starts as an over-emphasis on usual physical body sensations, such as a faster heart rate and feeling sweaty,” Trent adds. “Therefore, it makes sense that, in people who are prone to panic, exercise could also trigger a panic attack.”

Technically, anyone could experience an anxiety or panic attack during or after a workout. As Trent notes, panic attacks have to start somewhere, and “it’s possible to have never had a panic attack before but to suddenly have one.”

How long do exercise-induced panic attacks last?

Research also shows exercise-induced panic is typically felt acutely and for a short period. Regular aerobic activity may aid in relieving panic disorder-related symptoms, such as anxiety and depression, in the longer term.

Here are 19 simple cardio activities for every level of experience you can do anywhere.

While some workouts encourage a higher calorie burn and others build strength, it’s less clear-cut regarding panic and anxiety.

“You are more likely to experience anxiety with intense workouts because cardiovascular activity increases heart rate and blood pressure,” says Dr. Meghan Marcum, chief psychologist at A Mission For Michael in San Juan Capistrano, California. “[And] anxiety symptoms also include increased heart rate and blood pressure.”

But Trent adds it’s important to note that everyone’s situations are different. “Anything which raises the heart rate, changes the breathing rate, and makes someone sweaty could contribute to panic,” she says.

“Sometimes, certain types of trauma panic can be triggered when someone gets their body into a certain position,” Trent says. So while Child’s Pose might be super relaxing for some, for others, it could be more panic-inducing than the prospect of sprint circuits.

“External stressors, your level of physical conditioning and current resources, and prior recovery can all play a role in how you may experience your exercise routine,” Ditzell says.

Ever drink a coffee or energy shot before a workout to gain an extra boost? You’re not alone: Plenty of us do so — caffeine has been shown to stimulate numerous areas of the body and enhance performance, focus, and even levels of fat burning.

However, when it comes to panic attacks, “caffeine and anxiety do not make good bedfellows,” states Trent. “Because many of the physical impacts of caffeine can feel a lot like anxiety anyway, taking this stimulant can lead to people noticing these physical symptoms more, which can keep the panic cycle going.”

Whether you’re at the gym or running through the park, social pressures can encourage feelings of panic, too.

“Some may experience symptoms when facing situations of changing in front of others, being intimidated by others who are in better shape, fear [about] using the equipment correctly, and even making small talk before a group exercise class,” Michaelides says.

Plus, studies confirm that exercising in a competitive environment triggers psychological and physiological stress responses, especially in those prone to anxiety.

Bodily activity is crucial for mental and physical health, so avoiding it isn’t a good idea. Plus, notes Michaelides, “avoidance reinforces this anxiety.” You can take steps to lower your risk of feeling anxious and ease yourself out of a panic attack.

Look after your noggin

“Anxiety thrives in a busy world like ours, so it’s important to practice mental health hygiene to keep anxiety levels low across situations, including during the times we exercise,” states Marcum.

Mental health hygiene can include:

Breathe easy

To get your breathing back on track and your heart rate pounding at a more reasonable rate, “soothing rhythm breathing is great,” suggests Trent.

It’s as easy as it sounds: Through your nose, slowly breathe in for a count of four, then back out for a count of four, and repeat. Want to know more? This article explains how and why deep breathing is a great anxiety reducer.

Know when to take a break

If you feel anxiety or panic creeping up during your workout, recognize that it’s better to stop rather than push on. “Drink some water, and don’t be afraid to sit down for a while,” Marcum says. Doing so will help you get on top of things before they spiral.

Speak with a therapist

The heightened anxiety you feel when experiencing panic attack-type symptoms may be rooted in a deeper issue, so it’s worth speaking with an expert to learn strategies to identify and treat whatever may be fueling your feelings.

“I would encourage anyone experiencing panic to reach out to an appropriately qualified mental health professional, such as a clinical psychologist, so that the appropriate changes can be made to help overcome the difficulties experienced,” Trent recommends.

Although there’s a definite relationship between the two, exercise itself doesn’t induce anxiety nor panic.

Rather, the physiological responses that arise can act as a trigger. And, while those who regularly experience panic are at greater risk of an exercise-related panic attack, anyone can have one.

Plus, a HIIT workout may be more likely to encourage the physiological reactions we often link with panic attacks — increased heart rate and faster breathing. But everyone’s reactions to exercise are varied, so something easier could still produce panic.

Using tactics that can help ease anxiety and break the cycle of panic, you can get back to working on being your strongest and healthiest self. After all, exercising for health is important, but it’s also meant to be enjoyed!