How to Treat Ankylosing Spondylitis: Meds to Surgery

Ankylosing spondylitis (AS) is treated with a combination of anti-inflammatory medications, exercise, and lifestyle adjustments, with stronger drugs added in steps if the disease doesn’t respond. Most people start with over-the-counter or prescription anti-inflammatory painkillers, and the majority can manage their symptoms without ever needing surgery. The goal of treatment is to control pain, preserve spinal mobility, and prevent the progressive fusion of vertebrae that characterizes more advanced disease.

Anti-Inflammatory Medication as the Starting Point

NSAIDs like ibuprofen, naproxen, and indomethacin are the cornerstone of AS treatment. The American College of Rheumatology strongly recommends NSAIDs as first-line therapy, and no single NSAID is considered superior to another. The right one for you depends on how your body responds and what side effects you can tolerate.

Guidelines conditionally recommend taking NSAIDs on a continuous daily schedule rather than only when pain flares up. Continuous use appears to do a better job of controlling the underlying inflammation, not just masking symptoms. That said, long-term NSAID use carries risks for your stomach lining, kidneys, and cardiovascular system, so your doctor will weigh those trade-offs based on your age and health history. If NSAIDs alone aren’t enough to control your symptoms, the next step is biologic or targeted therapy.

Biologic Drugs for Moderate to Severe Disease

When NSAIDs fall short, the standard next step is a class of injectable medications that block specific immune signals driving the inflammation. The most established are TNF inhibitors. In AS, blood levels of an inflammatory protein called TNF-alpha are elevated. TNF-alpha triggers a chain reaction: it activates immune cells, prompts the release of other inflammatory chemicals, and contributes to cartilage destruction in spinal joints. TNF inhibitors interrupt that process at the source, and they can produce significant improvements in pain, stiffness, and spinal mobility.

If TNF inhibitors don’t work well enough or cause side effects, a newer class of biologics targets a different immune signal called IL-17A. These drugs were the first non-TNF biologics approved for AS, and they’ve proven effective even in some patients who didn’t respond to TNF blockers. Research into the IL-17 pathway has shown that specific immune cell populations in the entheses (the spots where tendons and ligaments attach to bone, a key site of AS inflammation) produce IL-17A, making these drugs a good mechanistic fit for the disease.

JAK Inhibitors: An Oral Alternative

For people who prefer pills over injections, JAK inhibitors are a newer option. These oral medications block enzymes inside immune cells that relay inflammatory signals, including signals from the same IL-17 pathway targeted by biologics. In a meta-analysis of six randomized trials, JAK inhibitors proved effective in patients with active AS who hadn’t responded to NSAIDs. One specific JAK inhibitor at a standard dose showed the highest response rates for both short-term and longer-term improvement measures, performing comparably to injectable biologics.

Screening Before Starting Biologics or JAK Inhibitors

Because these medications suppress parts of your immune system, you’ll need screening for infections like tuberculosis and hepatitis before starting treatment. TB screening is particularly important for TNF inhibitors, which carry the highest rates of TB reactivation among all biologic classes. Patients on certain TNF inhibitors have TB incidence rates as high as 90 to 2,558 per 100,000 patient-years, well above the general population. JAK inhibitors also carry elevated risk, with rates of 150 to 230 per 100,000 patient-years. If you were born outside the U.S., have traveled to a TB-endemic country, or have had close contact with someone with active TB, your doctor will likely order additional testing before clearing you to start.

Exercise and Physical Therapy

Medication controls inflammation, but exercise is what preserves your ability to move. Up to 10 to 20% of people with AS in the United States receive formal physical therapy, though the real number who benefit from structured exercise is likely much higher. Programs typically focus on four areas: stretching, flexibility, strengthening, and breathing exercises to maintain chest expansion (which AS can restrict over time).

The most effective programs in clinical studies ran for about 12 weeks, with three sessions per week lasting roughly 60 minutes each. Key movements include spinal extension, lateral flexion, and rotation, performed in multiple positions: lying face down, on your back, on your side, and sitting. Passive mobility work, where a therapist moves your joints through their range, supplements the active exercises. Water-based exercise (pool therapy) is another option that some people find easier on stiff, painful joints, though most studied programs were land-based.

The takeaway is consistency. A regular routine of back stretching, posture work, and cardiovascular exercise helps avoid stiffness and maintains functional capacity over time. Even on days when you don’t feel like doing a full session, shorter movement breaks that take your spine through its full range of motion are valuable.

Sleep Position and Daily Posture

How you sleep matters more with AS than with most conditions, because the disease can gradually lock your spine into whatever position it spends the most time in. Sleeping on your back is the best option. Placing a pillow under your knees keeps them slightly bent, which relaxes the muscles along your spine and lets it rest in a neutral position. If you sleep on your side, a pillow between your knees takes tension off your hips and lower back.

Sleeping on your stomach is the worst position for your spine, but if it’s the only way you can fall asleep, placing a pillow under your abdomen across your pelvis helps reduce the arch in your lower back. Beyond sleep, maintaining upright posture during the day, particularly while sitting at a desk, is an ongoing priority. AS tends to pull the spine into a forward curve, and habitual slouching accelerates that process.

Diet and Inflammation

A Mediterranean diet rich in vegetables, fruits, olive oil, fish, and whole grains shows real promise for reducing disease activity in AS. In an Italian study that followed patients for six months, those who received nutritional counseling on the Mediterranean diet were seven times more likely to see a meaningful improvement in their disease activity scores compared to controls. Both patient-reported symptoms and lab markers of inflammation (CRP) improved in the group that adopted the diet. The effect wasn’t dramatic in absolute terms, with disease activity scores dropping modestly, but it was statistically significant and came with no side effects.

No specific food has been proven to cause AS flares, and extreme elimination diets aren’t supported by strong evidence. The Mediterranean diet works not because it removes a culprit food but because its overall pattern is anti-inflammatory: high in omega-3 fatty acids, polyphenols, and fiber, and low in processed foods and refined sugars that tend to promote inflammation.

When Surgery Becomes Necessary

Surgery for AS is rare and reserved for severe spinal deformity. The most common indication is a pronounced forward curvature of the spine (kyphosis) that becomes so extreme it limits your ability to look straight ahead or maintain balance. In these cases, a surgeon removes a wedge of bone from the spine to straighten it, a procedure called an osteotomy. This is major surgery with significant recovery time, and it’s considered only when the deformity substantially impacts daily function and has not responded to all other treatments. Joint replacement surgery, particularly for the hips, is more common than spinal surgery in AS patients and can dramatically improve mobility when hip joints become severely damaged.