We used a matched case–cohort design to estimate the risk of suicidal behavior in individuals diagnosed with OCD, compared with general population controls. Each OCD patient in the cohort was matched on sex, birth year and county of residence at the time of the first OCD diagnosis with up to 10 general population controls from the Swedish Register of Total Population who had never been diagnosed with OCD by the date of the corresponding cohort member’s date of first diagnosis.