Objective. Our main objective was to assess the relationship between body composition (BC) and response to tumor necrosis factor-a (TNF-a) blocker treatment in patients with ankylosing spondylitis (AS). Our secondary objective was to evaluate the change of BC after treatment, accounting for sex and age. Methods. All included patients fulfilled the modified New York criteria for AS and were naive to TNF-a blocker. They were followed for at least 6 months after the start of etanercept or adalimumab. The Ankylosing Spondylitis Disease Activity Score containing C-reactive protein (ASDAS-CRP) and the Bath Ankylosing Spondylitis Disease Activity Index (BASDAI) were reported. BC was assessed by whole body dual-energy X-ray absorptiometry. Body fat percentage (BF%), fat mass index (FMI), and fat free mass index (FFMI) were reported as absolute values and as percentiles. Results. Forty-one patients were included (61% men). The median followup was 14.3 months (interquartile range 8.4-19.4). After multivariate regression analysis, more fat at baseline (BF%, FMI, or FMI percentile) was significantly related with a lower chance of achieving a clinically important improvement of the ASDAS-CRP or BASDAI after treatment. The body composition did not change significantly after treatment, but there was a trend toward muscle recovery in men (FFMI change from 34.0th to 37.4th percentile). Conclusion. Higher body fat content at baseline was independently associated with a worse response to treatment with TNF-a blockers, measured by ASDAS-CRP and BASDAI change, and might contribute to the lower response rates in female patients. Also, there is a trend toward muscle mass recovery in male patients after treatment.