Step 1: Analyse the clinical features.
The patient has: (1) backache with morning stiffness -- inflammatory back pain pattern; (2) red eye -- uveitis/iritis, a classic extra-articular feature; (3) ankle swelling -- peripheral enthesitis/arthritis. This triad is classic for a seronegative spondyloarthropathy.
Step 2: Apply diagnostic criteria for Ankylosing Spondylitis (AS).
AS is an HLA-B27 associated seronegative spondyloarthropathy. Inflammatory back pain in AS characteristically: affects patients under 45 years of age, has insidious onset, improves with exercise, does not improve with rest, and is associated with morning stiffness exceeding 30 minutes. Extra-articular features include anterior uveitis (red eye), enthesitis (heel pain, ankle swelling), and peripheral arthritis.
Step 3: Interpret the pelvic X-ray findings.
X-ray features of AS in the sacroiliac joints include: early -- subchondral sclerosis and erosions giving a pseudo-widening appearance; late -- complete fusion (ankylosis) of SI joints. Spinal features include vertebral body squaring, bamboo spine (syndesmophytic ankylosis), and dagger spine appearance.
Step 4: Eliminate alternatives.
Healed TB spine affects vertebral bodies with anterior wedging and gibbus deformity. Paget's disease shows bone enlargement with coarse trabeculation. Osteopetrosis shows uniformly dense bones (marble bone disease) without articular inflammation.
Conclusion: Ankylosing Spondylitis is the correct diagnosis.