Inclusion Criteria:  > 11 points on the anxiety or depression subscale, Hospital Anxiety and Depression scale somatic health problems (pain > 3 months) with functional impairment (>3 on question 2 of the Multidimensional Pain Inventory, MPI, OR > 20 points on question 21-24 of the Örebro Musculoskeletal Pain Questionnaire, ÖMPQ)  Exclusion Criteria:  severe psychiatric problems requiring immediate other treatment current psychological treatment recently started psychopharmacological treatment for anxiety or depression (<3 months prior to planned treatment) insufficient mastery of the Swedish language