Medications for ankylosing spondylitis are used to treat a type of arthritis mostly affecting the joints in the spine. They work by reducing inflammation and suppressing the immune system to help relieve symptoms. Common classes include tumor necrosis cactor (TNF) inhibitors and janus kinase (JAK) inhibitors. TNF inhibitors like adalimumab (Humira) and etanercept (Enbrel) are usually given as injections. JAK inhibitors, such as upadacitinib (Rinvoq), are taken as oral pills. These options provide different ways to help manage your symptoms effectively.