Ankylosing spondylitis is a type of arthritis that causes severe inflammation in the joints and ligaments of the spine. It also affects your peripheral joints like the knees, ankles, and hips.