Research has shown that most people who have ankylosing spondylitis carry a particular gene known as human leukocyte antigen B27 (HLA-B27). Among people with ankylosing spondylitis, 9 out of 10 have HLA-B27.
It is thought that having HLA-B27 may make having ankylosing spondylitis more likely. However, if you have the gene it does not necessarily mean that you will also have the condition. It is estimated that 8 in 100 people in the general population have the HLA-B27 gene but do not have ankylosing spondylitis.
Definition from NHS Choices: HLA-B27 gene