IntroductionEthnic heterogeneity has been linked to both protective and detrimental effects on mental health. Few studies have investigated the role of social capital in this relationship and none have found that it has an explanatory role. The aim of this study is to investigate the relationship between two measures of ethnic heterogeneity and psychological distress in Stockholm County, as well as the explanatory role of social capital for individuals with Swedish-background, foreign-background and those who are foreign-born. MethodsThis study used data collected from respondents aged 18–64 to the 2002, 2006, 2010 baseline questionnaires of the Stockholm Public Health Cohort and was linked with individual and area-level register information. Ethnic heterogeneity was the main exposure, measured by: 1) ethnic density, defined as the proportion of first and second generation immigrants with 2 foreign-born parents; and 2) ethnic diversity, using the fragmentation index. Social capital measures of individual and contextual-level social support and horizontal trust were the main explanatory factors of interest. The outcome, psychological distress, was assessed using the General Health Questionnaire-12 with a 2/3 cut-off. Prevalence ratios with 95% confidence intervals were estimated using multi-level poisson regression with robust variances. ResultsAge and sex adjusted analyses for the whole study population demonstrated that a 10% increase in ethnic density or diversity was associated with a 1.06 (1.05–1.07) times higher prevalence of psychological distress. In the stratified analyses, both foreign-born respondents and those with Swedish-background showed increasing prevalence of psychological distress with increasing ethnic heterogeneity. However, this trend was entirely explained by socioeconomic factors in the Swedish-background respondents and by additional adjustments for individual and contextual social support and horizontal trust for the foreign-born. Further adjustment for contextual horizontal trust showed ethnic heterogeneity to be protective for respondents Swedish-background. There was no clear trend between ethnic heterogeneity and psychological distress for respondents with foreign-background. ConclusionThe association between ethnic heterogeneity and psychological distress differs by ethnic background. There was no difference in this association based on the measure of ethnic heterogeneity used, nor in the explanatory role of social capital between ethnic heterogeneity measures. Socioeconomic indicators and some elements of individual and contextual social capital are important explanatory factors of the excess risk of psychological distress with regards to ethnic heterogeneity.