Ankylosing spondylitis (AS) is a type of autoimmune disease. This means that the immune system attacks healthy cells in the body. In the case of AS, the immune system attacks the joints, which leads to pain and other symptoms. It also may cause joint damage.
Source: Medical News Today