We run through sleet and snow, heat and haze, with blisters and black toenails, headaches and knee aches. But a side stitch? That sharp, stabbing pain that hits below the ribs can stop us in our tracks. Although the exact cause of side stitches has yet to be proven, theories abound.

Jordan Metzl, M.D., a sports medicine physician at the Hospital for Special Surgery in New York City and creator of Runner’s World’s IronStrength workout, says the most likely cause is a diaphragm spasm. The diaphragm, a sheet of muscle that extends across the bottom of the rib cage, plays an important role in breathing. Just like your leg muscles, your diaphragm can fatigue and cramp when put under too much stress. That’s why side stitches tend to strike beginner runners or those stepping up pace or distance.

Another possible culprit? Weak core muscles.

“You require your core muscles to stabilize you as you launch and land with each stride. If your core muscles aren’t adequately strong, or perhaps you are running at a pace that is faster than what you are adequately conditioned for, this may contribute to the problem,” says Janet Hamilton, an exercise physiologist and owner of Running Strong.

According to Hamilton, runners seem to experience side stitches the most due to the demand on the respiratory system. “When you run, you have to breathe deeper and faster to provide adequate oxygen to your working muscles,” she says.

The good news is that there are a variety of effective strategies—ones that have been put to the test with the runners Hamilton has coached—that can help prevent and treat this common problem.

How to Prevent Side Stitches

1. Strengthen Your Core

Performing just 10 minutes of core-strengthening exercises—such as planks and donkey kicks—three times a week (or practicing yoga or Pilates on a regular basis) can strengthen weak diaphragm muscles, making them more resilient to fatigue and less likely to cramp. Bonus: A stronger core will also help you run more efficiently and reduce your overall vulnerability to injury.

No matter what you’re looking to improve in your running life, find it with Runner’s World+!

2. Fuel Wisely

What and when you eat before a run may contribute to side stitches. If your body is still digesting food, there will be less blood flowing to the diaphragm, which can induce spasms. Foods that are high in fat and fiber take longer to digest, and should be avoided one to two hours before you run. Studies have also found that fruit juices and beverages that are high in sugar can contribute to stitches. So consider keeping a log of the foods and drinks you consume prerun and when you experience a stitch so you can recognize triggers.

3. Warm Up Properly

Going from standing to a full sprint may save you time on the watch, but it can create irregular, rapid-fire breathing patterns, which can leave you bending over in pain. Invest in two to three minutes of brisk walking, and then gradually work into an easy running effort before launching into your planned workout pace.

4. Focus on Your Breathing

If breathing is too shallow, it doesn’t provide adequate oxygen to working muscles, including the diaphragm. Inhaling and exhaling fully and deeply can help reduce the occurrence of side stitches. Research shows that breathing “faster”—as in, inhale for two steps, exhale for one step—increases the depth of breath.

How to Handle Side Stitches Midrun

1. Slow Down

If a side stitch strikes, Hamilton recommends slowing your pace or even taking a walking break until it starts to feel better. Sometimes it even helps to put your hand over the area that’s painful and do some resisted exhaling—take a deep breath in, press hard with your hand over the stitch, and blow out the breath through pursed lips, and repeat this pattern a few times.

2. Adjust Your Breathing

If there’s no chance you can stop or slow (say, during a race), Hamilton suggests paying attention to your breathing pattern, making sure your breaths are uneven. For example, if you notice you’re breathing in for two steps and out for two steps, switch it up so you’re breathing in for two and out for three. What this does is it has you initiating the inhale (or exhale) on a different footfall each time, which is important because you’re switching your breathing from one weight-bearing side to the other, therefore preventing continuing stress on one specific side.