Chronic musculoskeletal pain constitutes a large socioeconomic challenge, and preventive measures with documented effects are warranted. The authors' aim in this study was to prospectively investigate the association between physical exercise, body mass index (BMI), and risk of chronic pain in the low back and neck/shoulders. The study comprised data on approximately 30,000 women and men in the Nord-Trøndelag Health Study (Norway) who reported no pain or physical impairment at baseline in 1984-1986. Occurrence of chronic musculoskeletal pain was assessed at follow-up in 1995-1997. A generalized linear model was used to calculate adjusted risk ratios. For both females and males, hours of physical exercise per week were linearly and inversely associated with risk of chronic pain in the low back (women: P-trend = 0.02; men: P-trend < 0.001) and neck/shoulders (women: P-trend = 0.002; men: P-trend < 0.001). Obese women and men had an approximately 20% increased risk of chronic pain in both the low back and the neck/shoulders. Exercising for 1 or more hours per week compensated, to some extent, for the adverse effect of high BMI on risk of chronic pain. The authors conclude that physical inactivity and high BMI are associated with an increased risk of chronic pain in the low back and neck/shoulders in the general adult population.