ABSTRACT: BACKGROUND:Bariatric surgery reduces mortality, but might have adverse effects on mental health. We assessed the risk of suicide and self-harm after bariatric surgery compared with non-surgical obesity treatment. METHODS:Suicide and non-fatal self-harm events retrieved from nationwide Swedish registers were examined in two cohorts. The non-randomised, prospective Swedish Obese Subjects (SOS) study compared bariatric surgery (n=2010; 1369 vertical-banded gastroplasty, 376 gastric banding, and 265 gastric bypass) with usual care (n=2037; recruitment 1987-2001). The second cohort consisted of individuals from the Scandinavian Obesity Surgery Registry (SOReg; n=20?256 patients who had gastric bypass) matched to individuals treated with intensive lifestyle modification (n=16?162; intervention 2006-13) on baseline BMI, age, sex, education level, diabetes, cardiovascular disease, history of self-harm, substance misuse, antidepressant use, anxiolytics use, and psychiatric health-care contacts. FINDINGS:During 68?528 person-years (median 18; IQR 14-21) in the SOS study, suicides or non-fatal self-harm events were higher in the surgery group (n=87) than in the control group (n=49; adjusted hazard ratio [aHR] 1·78, 95% CI 1·23-2·57; p=0·0021); of these events, nine and three were suicides, respectively (3·06, 0·79-11·88; p=0·11). In analyses by primary procedure type, increased risk of suicide or non-fatal self-harm was identified for gastric bypass (3·48, 1·65-7·31; p=0·0010), gastric banding (2·43, 1·23-4·82; p=0·011), and vertical-banded gastroplasty (2·25, 1·37-3·71; p=0·0015) compared with controls. Out of nine deaths by suicide in the SOS surgery group, five occurred after gastric bypass (two primary and three converted procedures). During 149?582 person-years (median 3·9; IQR 2·8-5·2), more suicides or non-fatal self-harm events were reported in the SOReg gastric bypass group (n=341) than in the intensive lifestyle group (n=84; aHR 3·16, 2·46-4·06; p<0·0001); of these events, 33 and five were suicides, respectively (5·17, 1·86-14·37; p=0·0017). In SOS, substance misuse during follow-up was recorded in 48% (39/81) of patients treated with surgery and 28% (13/47) of controls with non-fatal self-harm events (p=0·023). Correspondingly, substance misuse during follow-up was recorded in 51% (162/316) of participants in the SOReg gastric bypass group and 29% (23/80) of participants in the intensive lifestyle group with non-fatal self-harm events (p=0·0003). The risk of suicide and self-harm was not associated with poor weight loss outcome. INTERPRETATION:Bariatric surgery was associated with suicide and non-fatal self-harm. However, the absolute risks were low and do not justify a general discouragement of bariatric surgery. The findings indicate a need for thorough preoperative psychiatric history assessment along with provision of information about increased risk of self-harm following surgery. Moreover, the findings call for postoperative surveillance with particular attention to mental health. FUNDING:US National Institutes of Health and Swedish Research Council.