Ankylosing spondylitis has no known specific cause, though genetic factors seem to be involved. In particular, people who have a gene called HLA-B27 are at a greatly increased risk of developing ankylosing spondylitis. However, only some people with the gene develop the condition.