Ankylosing spondylitis is a type of rheumatic arthritis that affects the ligaments and joints of the spine. This inflammatory condition can trigger pain and stiffness in the back, as well as other symptoms affecting the skin, eyes, digestive system, and even testicles.

Anti-inflammatory medications can often relieve back pain and discomfort elsewhere. Treating the underlying spinal problem with physical therapy — or surgery in severe cases — may help ease symptoms in the back and other locations.

Even though ankylosing spondylitis (AS) is essentially a spinal condition, the pain that usually begins in the lower back can radiate into the legs and testicles and throughout the body. This is because AS can cause the vertebrae to fuse together. The resulting growth of new bony material can press against nerves in the spine.

The pain that starts in the back and radiates to the testicles or other body parts is often worse after periods of inactivity, such as lying down to sleep or sitting in a chair for a long time.

When to contact your doctor

Testicle pain that lingers always warrants a medical evaluation, as there are many potential causes, including AS. You should also see a doctor about lower back pain, especially if it doesn’t stem from a simple injury such as lifting something heavy.

You should also be evaluated by a doctor if you have back pain that happens with or without pain in the testicles (or elsewhere) and if it develops gradually or is worse after lying down or sitting down for a while.

Was this helpful?

There’s currently no cure for AS, so the primary goal of treatment is to ease pain and joint stiffness wherever it develops.

By treating the underlying causes of your testicular pain — the inflammation affecting the spine — you may also find that your other symptoms become less bothersome.


If your pain is relatively mild, then over-the-counter (OTC) nonsteroidal anti-inflammatory drugs (NSAIDs), such as ibuprofen (Advil) or naproxen (Aleve), may be sufficient to ease your symptoms.

If OTC medications don’t provide enough relief, your doctor may prescribe a tumor necrosis factor (TNF) blocker, such as adalimumab (Humira) or etanercept (Enbrel). TNF blockers are injected under the skin or given intravenously (via IV). The same is true for interleukin-17 inhibitors, such as secukinumab (Cosentyx) and ixekizumab (Taltz).

Another type of NSAID, called COX-2 inhibitors, is commonly prescribed for various types of rheumatoid arthritis, including AS. Celecoxib (Celebrex) is one of the most commonly prescribed pain relievers in this class.

Other treatments

If you experience flare-ups of testicular pain associated with AS, you may find relief with ice packs on your scrotum. Elevating the scrotum and resting may provide additional relief.

Some individuals also find that symptoms are less severe when they wear an athletic supporter or snug-fitting briefs.

Physical therapy to strengthen the muscles supporting the spine may be helpful for many people who have AS that isn’t being sufficiently managed with anti-inflammatory drugs and regular exercise.

For severe cases, where your daily functioning is affected, surgery to repair or replace affected joints may be the best option.

Because AS is an uncommon condition, you may feel alone or filled with questions and concerns. You may also develop symptoms of anxiety or depression.

To get the support you need and deserve, you may want to take advantage of resources and support groups for people with AS and their families.

The Spondylitis Association of America is a good place to start. It has message boards, news, and other information you may find helpful. Regional support groups allow you to talk with other individuals facing similar challenges living with and managing AS.

It’s also important to be proactive about the health of your spine and the rest of your body. Consider the following steps to improve your quality of life with AS:

Can ankylosing spondylitis cause infertility?

Inflammatory conditions such as AS can affect many bodily functions and various aspects of physical and mental health. However, research suggests that AS is unlikely to adversely affect male fertility.

A research review in 2016 on rheumatic diseases including AS concluded that AS and treatment with TNF inhibitors should not affect fertility.

A separate study in 2018 also suggests that having AS and using the anti-inflammatory drugs celecoxib and sulphasalazine for treatment shouldn’t negatively affect fertility or sperm quality.

Was this helpful?

AS doesn’t always cause testicle pain, but when it does, anti-inflammatory medications may ease both back pain and any accompanying pain in the testicles or other parts of the body. Keeping the scrotum iced and elevated might help during a flare-up.

Keep in mind that the earlier you begin treatment and start working with a doctor, the more effective that treatment will be in slowing the progression of AS.