Diagnosing ankylosing spondylitis early is important, though, because the sooner you begin treatment, the better, Dr. Lozada says. The right treatment can help keep your spine flexible and your joints moving. Treating ankylosing spondylitis may prevent or delay permanent damage to your spine and other joints, including your hips and shoulders, which may also be affected. Medications prescribed for ankylosing spondylitis include these types:

Nonsteroidal anti-inflammatory drugs (NSAIDs)Disease-modifying anti-rheumatic drugs (DMARDs)Biologics, which are immunosuppressants that have been genetically engineered from living organismsJanus kinase inhibitorsCorticosteroids, which are used for acute flares

The best treatment plan for you will depend on what symptoms you have and which joints are affected, as well as any other health conditions you may have. Here’s what you need to know about each ankylosing spondylitis treatment option.

NSAIDs for Ankylosing Spondylitis

After making an ankylosing spondylitis diagnosis, doctors often prescribe or recommend taking NSAIDs, which fight inflammation, at least initially as an alternative to steroids. You can purchase NSAIDs over the counter, or your doctor may write a prescription for a higher-strength dose. Aspirin, ibuprofen, and naproxen are all NSAIDs. It’s important that you don’t take over-the-counter medications at amounts above the recommended daily dose, as side effects could occur. Depending on your prescribed treatment regimen, you may take NSAIDs as needed or on a regular basis to control your pain and stiffness. A study published in April 2020 in the journal Experimental and Therapeutic Medicine found that when comparing six types of NSAIDs used in treating ankylosing spondylitis, all were highly effective in reducing pain and well tolerated. NSAIDs work by blocking the enzymes in your body that produce prostaglandins, which are chemicals that trigger pain and inflammation. NSAIDs help reduce the level of prostaglandins you produce and, as a result, improve pain and inflammation, Lozada says. Some people feel better within a few hours of taking NSAIDs, but it could take a few days to two weeks to notice changes in your symptoms. If you don’t find relief within two to three weeks, talk with your doctor about switching to a different NSAID or trying a different class of medication. Long-term use of NSAIDs can cause stomach upset and heartburn, and make you more susceptible to stomach ulcers. If you have Crohn’s disease, ulcerative colitis, kidney disease, heart disease, or certain other health conditions, your doctor may advise you not to take NSAIDs.

DMARDs for Ankylosing Spondylitis

DMARDs may be prescribed if you have ankylosing spondylitis, but they’re a less likely treatment option. DMARDs work best if your knees or ankles are painful and swollen. Although some people who have both ankylosing spondylitis and rheumatoid arthritis (RA) have had success with DMARDs, these drugs don’t seem to help most people who only have ankylosing spondylitis, Lozada says. The most commonly prescribed DMARD is sulfasalazine, according to the Spondylitis Association of America. Methotrexate, a common chemotherapy drug, may also be prescribed for treating ankylosing spondylitis. Doctors generally prescribe smaller doses of methotrexate for people with ankylosing spondylitis than people with RA. This medication can be taken orally or by injection. “Methotrexate is not particularly effective for back pain due to ankylosing spondylitis,” Lozada says. “It may help more if the pain is in your hip.”

Biologics and JAK Inhibitors for Ankylosing Spondylitis

If you’ve tried two different NSAIDs at full strength and still haven’t found relief, your doctor may consider prescribing a biologic or Janus kinase (JAK) inhibitor medication. Biologics offer the most benefit if the joints of your spine are inflamed. Most are tumor necrosis factor (TNF) inhibitors, meaning they work by suppressing production of the TNF-alpha protein, which is known to trigger inflammation. Five TNF-alpha inhibitor biologics are currently approved for the treatment of ankylosing spondylitis: adalimumab, certolizumab pegol, etanercept, golimumab, and infliximab. Two other approved biologics, ixekizumab and secukinumab, are in another class called IL-17 inhibitors. IL-17 is a type of cell that plays a role in triggering the immune response that leads to ankylosing spondylitis. The goal of IL-17 inhibitors is to turn off this trigger. JAK inhibitors are similar to biologics and are also approved for ankylosing spondylitis. But whereas biologics stop inflammation signaling outside cells, JAK inhibitors prevent inflammation signaling from the inside. Two JAK inhibitors have been approved for ankylosing spondylitis: tofacitinib (Xeljanz) and upadacitinib (Rinvoq). Each biologic drug is administered by either injection or intravenous infusion. JAK inhibitors may be taken as pills. Because biologics and JAK inhibitors for ankylosing spondylitis are immunosuppressants, you’re at an increased risk for infection while taking them, Lozada says. In addition, a tuberculosis test is usually required before starting biologic therapy. JAK inhibitors can increase the risk of serious heart-related events like heart attack or stroke, as well as the risk of cancer, blood clots, and death, especially for past or current smokers and those with existing heart conditions.

Corticosteroids for Ankylosing Spondylitis

Corticosteroids such as prednisone can also help relieve the pain and swelling of ankylosing spondylitis in the short term. Because long-term use of steroids poses certain health risks, your doctor may be hesitant to prescribe them too often. Corticosteroids can be taken by mouth or injected into the affected joints — the sacroiliac joint in the pelvis, the hip, or the knee — to provide temporary relief. However, they can’t be injected into the spine for ankylosing spondylitis.

Finding the Right Ankylosing Spondylitis Medication for You

It’s essential to work with your doctor to find a treatment plan that’s right for you. People respond differently to different medications for ankylosing spondylitis, so finding the treatment that works best for you may require some trial and error. Regardless of which therapy you’re on, you need to talk with your doctor about altering your treatment plan if you don’t see improvement after about three months, Lozada says.