Ankylosing spondylitis: the young back pain that improves with exercise, not rest

Last updated September 3, 2026.

Ankylosing spondylitis (axial spondyloarthritis) is inflammatory arthritis of the spine and sacroiliac joints, producing chronic back pain and stiffness that characteristically starts young (teens to thirties), eases with exercise and worsens with rest, and disturbs the second half of the night. It is underdiagnosed for years on average (written off as ordinary back pain), and the modern treatments, especially the biologic injections, have transformed its course.

What does it feel like?

The inflammatory back-pain pattern, opposite to mechanical back pain: starting under 40-45, creeping in over months, worst in the morning (stiffness over 30 minutes) and the second half of the night, improving with exercise and movement, not with rest. Then the extras: alternating buttock pain, enthesitis (where tendons insert: the heel, the Achilles), fatigue, and the associated conditions: eye inflammation (uveitis: a painful red eye), psoriasis, and inflammatory bowel disease. Untreated over years, the spine can progressively stiffen and fuse; treated, that trajectory is largely preventable.

Why does it happen?

Immune-driven inflammation of the spine's joints and tendon insertions, strongly genetic: the HLA-B27 gene is carried by most patients (though most carriers never develop it), and it clusters in families. It is not caused by posture, injury, or wear and tear. It affects men somewhat more, starts young, and its inflammatory markers and MRI sacroiliac changes are the diagnostic anchors alongside the pattern. Delays of years between first symptoms and diagnosis remain common, which is why the pattern matters.

Find answers to your ankylosing spondylitis

Start a free AI doctor consult →

What actually works?

When is it an emergency?

The urgent items: a painful red light-sensitive eye (uveitis: same-day eye care, every time), new leg weakness, numbness, or bladder or bowel change (spinal cord or cauda equina compression in a stiff spine: emergency), a fracture after minor trauma (the fused, osteoporotic spine breaks more easily: take neck or back injury seriously), and severe chest pain or breathlessness (the rare heart and lung complications). The chronic pain itself is rheumatology medicine, best engaged early rather than after fusion. Pymander's escalation routing is built and tested specifically for this class of decision; see the safety architecture working paper.

What a Pymander AI doctor consult looks like

Is your back pain worst in the morning and night, improving with exercise rather than rest, starting before age 45?
I am 29 and have had back pain and morning stiffness for three years. It wakes me at 4am and loosens with a run, which every physio found strange. My grandfather had a bent-over spine.
Thanks for giving me all this information. Based on what you've said, your pattern (three years of back pain starting young, waking you in the second half of the night, easing with exercise rather than rest, plus a grandfather with a fused spine) is the inflammatory pattern that raises ankylosing spondylitis, and your physio's instinct that it is strange is the key observation: mechanical back pain behaves oppositely. The next steps: blood tests (inflammation markers and the HLA-B27 gene), X-rays and likely an MRI of the sacroiliac joints, and a rheumatology referral. This condition responds well to modern treatment, and catching it at 29 rather than after fusion is exactly the win. Here's your care note to share with your care team.
Care note
Suspected axial spondyloarthritis, 29, inflammatory pattern, family history
Twenty-nine-year-old: 3 years of back pain with morning stiffness, second-half-of-night waking, improvement with exercise, grandfather with kyphotic fused spine: inflammatory back pain, suspected axial spondyloarthritis. Plan: CRP/ESR, HLA-B27, sacroiliac X-rays and MRI, rheumatology referral; NSAID trial, physiotherapy exercise program as core treatment, smoking cessation if applicable, uveitis education (painful red eye = same-day). Escalation: neuro deficit or bladder change (emergency), post-trauma neck or back pain in stiff spine.
View care note →

Illustrative example, not a real member's messages.

Common questions

How is this different from ordinary back pain?

The behavior flips: mechanical back pain (the common kind from strain and wear) worsens with activity and eases with rest, is worst in the evening, and comes at any age; inflammatory back pain (this condition) eases with exercise and worsens with rest, is worst in the morning (stiffness over 30 minutes) and the second half of the night, and starts young (usually before 40-45). Add the alternating buttock pain, the heel and tendon-insertion pains, and the slow insidious onset, and the pattern separates them before any scan. This flip is why so many patients spend years being prescribed rest and core work for a condition that actually demands movement and anti-inflammatories.

What does the HLA-B27 gene test actually tell me?

Context, not verdict: HLA-B27 is carried by around 8% of white European populations and by the large majority of ankylosing spondylitis patients, so a positive test supports the diagnosis when the pattern already fits, and a negative one makes it less likely but not impossible. Crucially, most HLA-B27 carriers never develop the disease (the gene loads the gun; unknown factors pull the trigger), so the test never diagnoses alone: it is one witness alongside the symptom pattern, inflammatory blood markers, and the MRI of the sacroiliac joints, which is the decisive evidence early on. Family members asking whether to test: the answer is usually no without symptoms, since a positive result changes nothing for a well person.

Will my spine fuse? The pictures frighten me.

The historical fear, and the honest modern answer: untreated, active disease over decades can progressively fuse spinal segments (the bamboo spine of the old textbooks, and your grandfather's story), but the trajectory has changed fundamentally with modern treatment: early NSAIDs, exercise, and especially the biologic injections control the inflammation that drives fusion, and most patients diagnosed and treated today retain flexible spines. Your posture protection matters meanwhile: the stretching program, sleeping flat (thin pillow), and the standing-tall habit defend alignment while treatment controls the disease. Being diagnosed at 29 with modern options is a categorically different prognosis from your grandfather's era.

Why is exercise treatment here when every other back condition preaches caution?

Because the disease mechanism is the opposite: inflammation stiffens and immobilizes, so the countermeasure is motion: daily stretching preserves spinal mobility (the thing the disease is trying to take), strengthening holds posture against the forward-stoop tendency, and aerobic exercise lowers inflammatory load and protects the heart (which chronic inflammation threatens). The evidence is strong: exercise programs measurably improve pain, function, and spinal movement in AS, and physiotherapy is prescribed as centrally as medication. The caution applies differently (impact sports get individualized advice in advanced fused spines), but for most: movement is medicine, literally daily.

What are biologics and when do I get them?

Biologics are injections that block specific inflammatory signals (the anti-TNF drugs first, anti-IL-17 agents alongside), and they are the step for disease that keeps firing despite regular NSAIDs and the exercise program: in responders (the majority) they reduce pain and stiffness substantially, normalize inflammatory blood markers, and appear to slow the structural progression that caused your grandfather's spine. The practical shape: self-injection every one to several weeks, infection screening before starting (tuberculosis and hepatitis, since immunity is being modulated), and rheumatology monitoring. They have moved AS from a grim prognosis to a manageable one, and the referral conversation is worth having early rather than after years of uncontrolled inflammation.

What are the related conditions I should know about?

The spondyloarthritis family travels together: uveitis (eye inflammation: a painful, red, light-sensitive eye is same-day eye care, every episode, because repeated untreated attacks threaten vision); psoriasis (the skin and joint conditions cross over); inflammatory bowel disease (gut inflammation coexists and its symptoms, chronic diarrhea or blood, belong in the history); osteoporosis (the inflamed, stiffening spine loses bone: density scans and protection matter); and cardiovascular risk (chronic inflammation loads the arteries: the blood pressure, cholesterol, and smoking conversation is part of this condition's care). None of these is inevitable; all of them are screened-for because catching the satellites early is where the outcomes are won.

Sources

Pymander is not a replacement for a physician and does not provide medical advice, diagnosis, or treatment.

Free AI doctor, 24/7 by textStart a free AI doctor consult