The diagnosis of ankylosing spondylitis depends on a thorough clinical evaluation by a rheumatologist. The physician may order blood tests to take for the presence of HLA-B27 gene marker, and other markers of inflammation. These include sedimentation rate, also called ESR, and CRP. Imaging is an important tool to make the diagnosis. It might show extra bone formation, joint damage and joint fusion. X-rays are helpful to rule out all other conditions that could cause low back pain. MRI scans are more specific and can detect the signs of inflammation much sooner than x-rays. In summary, a thorough clinical evaluation, blood testing, and x-rays help in the diagnosis of this condition.