Background and Objectives:A previous study reported finding that epilepsy risk is elevated following bariatric surgery for weight loss; however, this association has not been adequately explored. Our objectives were to (1) estimate the risk of epilepsy following bariatric surgery for weight loss relative to a non-surgical cohort of patients with an obesity diagnosis, and (2) identify epilepsy risk factors among bariatric surgery recipients.Methods:We conducted a population-based retrospective cohort study using linked health administrative databases in Ontario, Canada. Participants were accrued between July 1, 2010, and December 31, 2016, and followed until December 31, 2019. All Ontario residents 18 years of age and older who had bariatric surgery during the accrual period were eligible for inclusion in our exposed cohort. Patients hospitalized with a diagnosis of obesity and who did not have bariatric surgery during the accrual period were eligible for inclusion in our unexposed cohort. We excluded patients with a history of seizures, epilepsy, various seizure or epilepsy risk factors, psychiatric disorders, or drug or alcohol abuse/dependence. In our primary analysis, we used inverse probability of treatment weighting to control for confounding. A marginal Cox proportional hazards model was then used to estimate the risk of epilepsy associated with bariatric surgery. A Cox model was also used to identify epilepsy risk factors among exposed participants.Results:The final sample included 16,958 exposed participants and 622,514 unexposed participants. Following inverse probability of treatment weighting, the estimated rates of epilepsy were 50.1 and 34.1 per 100,000 person-years among those who did and did not have bariatric surgery, respectively. The hazard ratio for developing epilepsy after bariatric surgery was 1.45 (95% CI=1.35, 1.56). Among participants who received bariatric surgery, stroke during follow-up increased epilepsy risk (HR=14.03, 95% CI=4.26, 46.25).Discussion:In this study, we found that patients with a history of bariatric surgery were at increased risk of developing epilepsy. These findings suggest that epilepsy is a long-term risk associated with bariatric surgery for weight loss.