Many patients with depression and/or anxiety (D/A) persistently report pain. However, it is not clear how the course of D/A is associated with pain over time. The present study assessed longitudinal associations between D/A and pain, and compared pain over time between D/A and healthy controls.2676 participants of the Netherlands Study of Depression and Anxiety were followed-up for four years. At three waves (baseline, 2, 4years) we assessed depressive and anxiety symptom severity. Using DSM-IV criteria, we also assessed four different D/A disorder courses over time (n=2093): incident, remitted, chronic, and no D/A (reference group). Pain was assessed at the three waves by severity and number of locations.Change in D/A symptoms was positively associated with change in pain symptoms. Compared to healthy controls (n=519), D/A subjects – incident (n=333), remitted (n=548) or chronic (n=693) – reported more severe pain (b=0.4–0.7, p<0.001) and more pain locations (b=0.8–1.4, p<.001) at all waves, with the highest ratings in chronic D/A. Remission of D/A during follow-up was associated with a significant decline in pain (severity; p=0.002, number of locations; p<.001), but pain levels remained significantly higher compared to healthy controls. Findings were similar for separate depression or anxiety course.This study largely confirms synchrony of change between depression, anxiety and pain. However, even after depression and anxiety remission, subjects report higher pain ratings over time. Individuals with D/A (history) seem to be at increased risk of chronic pain.