Pain is one of the main symptoms of ankylosing spondylitis (AS). Inflammation in your spine can make your lower back, hips, shoulders, and other parts of your body hurt.

One way to manage AS pain is with nonsteroidal anti-inflammatory drugs (NSAIDs), TNF inhibitors, and other drugs that bring down inflammation and slow joint damage. These medications are an important part of your treatment.

Exercise is another way to manage your pain. Though it can be hard to get moving, staying fit will keep your joints limber so you can move them with less discomfort.

Fitness offers added benefits, too. It helps you sleep better, improves your mood, and lowers heart disease risks like obesity, high blood pressure, high cholesterol, and high blood sugar. Preventing heart disease is especially critical for people with AS, who are at higher risk of heart attacks and strokes.

The best exercise program for AS includes four elements:

  • aerobic exercises such as walking, jogging, cycling, or dancing
  • strengthening exercises such as lifting light weights, using resistance bands, or working out in water
  • flexibility exercises like Pilates, yoga, or tai chi that work each joint through its range of motion
  • stretching exercises to loosen tight muscles

When you’re in pain, the last thing you may want to do is jump on a bicycle or go for a walk. If you’re having trouble staying active, here are a few tips to help you incorporate more exercise into your life.

Ease into it

Jumping straight into a new routine could lead to frustration and possibly injury. Not every exercise program is safe for AS, especially if your disease is severe.

Before you try a new program, get approval from your doctor. Then, start slowly. You may only be able to ride your stationary bike for a quarter of a mile the first time. Gradually increase the time, intensity, and distance when your body is ready.

Make exercise convenient for you

One mistake people make is trying to carve out 30 minutes or an hour at a time for exercise. If you’re busy, finding that much time in your schedule can seem impossible.

Instead of going to the gym for an hour, incorporate small bouts of exercise into your daily routine. Exercise when — and where — it’s convenient for you. Here are a few ideas:

  • Walk for 15 minutes in the morning before you go to work.
  • Run up and down the stairs for 10 minutes at lunchtime.
  • Do squats while you watch TV or brush your teeth.
  • Walk around while you talk on the phone.
  • Do heel raises or stand on one leg while you wait in the checkout line at the supermarket.
  • Ride your bike to the store instead of driving, if it’s close enough.

Do what you love

Another big fitness mistake people make is trying to fit themselves into a workout that doesn’t suit them. You’ll find any excuse to avoid going to the gym if you hate the crowds and loathe the weight machines.

Instead, pick an activity you love. If you’re into dance, try a Zumba workout or take a class at your local YMCA or community center. If you prefer rock climbing, find a gym with a rock wall and do that a few times a week. Try different activities — yoga, water aerobics, step class, spin — until you find the one that fits you best.

Control your pain

AS can be a painful condition. Don’t try to work out through the pain. If you hurt, take NSAIDs or use other treatments that your doctor recommends to get your discomfort under control before you exercise.

Grab a friend

Exercise can be much more fun when you do it in pairs. Walking or taking a fitness class with a friend will make the time pass much faster. Ideally, find someone who also has AS so you can work out at the same pace.

Adjust your workouts

You don’t have to do every exercise at full throttle. Make adjustments to adapt your program to fit your ability. Take the jump out of aerobics, use lighter weights, or move your workouts to the pool for more support on your joints.

Don’t make an impact

Certain activities can make AS symptoms worse, or cause injury to your bones and joints. Avoid high-impact sports like distance road running, football, and martial arts. Also, stay away from any activities that could cause you to fall, such as skiing or horseback riding. Ask your doctor for more advice about the safest fitness programs for AS.

See a physical therapist

Need a little guidance? Get help from a physical therapist (PT). A PT can teach you the best routine for AS, including flexibility, strengthening, and stretching exercises.

Your PT will also give you tips to improve your posture. Poor posture is a big problem in people with AS. Fusing of the spinal bones can cause you to stoop over, which increases your risk of falling and fracturing a bone.

Look for a PT who has been trained in orthopedic physical therapy, and who has experience working with people with AS.

AS causes you to feel pain in your lower back, among other places. If you’re living with the condition, it’s understandable to feel hesitant about getting up and staying active. Yet exercise is an important part of your overall well-being. Staying active can also help with AS pain.

If you’re new to working out, talk to your doctor about ways to ease yourself into it and local exercise programs they recommend.