Objective: Earlier studies documenting the effect of candidate genes on recovery have seldom taken into consideration the impact of emotional distress. Thus, we aimed to assess the modifying effect of emotional distress on genetic variability as a predictor for pain recovery in lumbar radicular (LRP) and low back pain (LBP). Results: The study population comprised 201 patients and mean age was 41.7 years. The significant association between MMP9 rs17576 (B = 0.71, 95% CI 0.18 to 1.24, p = 0.009) and pain recovery remained statistically significant after adjusting for pain intensity at baseline, age, gender, smoking, body mass index, pain localization and emotional distress (B = 0.68, 95% CI 0.18 to 1.18, p = 0.008). In contrast, the association between OPRM1 (B = − 0.85, 95% CI − 1.66 to − 0.05, p = 0.038) and pain recovery was abolished in the multivariate analysis (B = − 0.72, 95% CI − 1.46 to 0.02, p = 0.058). Hence, MMP9 rs17576 and emotional distress independently seem to predict persistent back pain. The predictive effect of OPRM1 rs179971 with regard to the same outcome is probably dependent on other factors including emotional processing.