Gastroesophageal reflux disease (GERD) is associated with a strong and severity-dependent increased risk of esophageal adenocarcinoma. Whether antireflux surgery prevents esophageal adenocarcinoma is a matter of uncertainty. To examine whether antireflux surgery is associated with reduced risk of esophageal adenocarcinoma and whether the risk is different between surgically and medically treated patients. In this multinational, population-based retrospective cohort study from Denmark, Finland, Iceland, Norway, and Sweden, patients undergoing surgery were followed up for a median of 12.7 years, and a comparison group of patients receiving medication only were followed up for a median of 4.8 years. All patients with a registered diagnosis of GERD (or an associated disorder), including 48 414 individuals undergoing surgery and 894 492 receiving medication only, were included in the study. The study periods varied in the different countries depending on the year of initiation of registration and the date of data retrieval, from January 1, 1964, to December 21, 2014. Antireflux surgery for GERD. The risk of esophageal adenocarcinoma over time after surgery was compared with that in a corresponding background population using standardized incidence ratios (SIRs) with 95% CIs and with patients with GERD who received medication using multivariable Cox proportional hazards regression, providing hazard ratios (HRs) with 95% CIs adjusted for confounders. In this study of 942 906 patients with GERD, 48 414 underwent antireflux surgery (median [interquartile range] age, 66.0 [58.0-73.0] years; 27 161 male [56.1%]) and 894 492 received medication only (median [interquartile range] age, 71.0 [62.0-78.0] years; 434 035 male [48.6%]). Among patients undergoing surgery, 177 developed esophageal adenocarcinoma. Esophageal adenocarcinoma risk decreased in a time-dependent manner after surgery compared with the background population (5 to <10 years after surgery: SIR, 7.63; 95% CI, 5.42-10.43; ≥15 years after surgery: SIR, 1.34; 95% CI, 0.98-1.80). Among patients with more severe and objectively determined GERD, the SIRs were 10.08 (95% CI, 6.98-14.09) at 5 to less than 10 years after surgery and 1.67 (95% CI, 1.15-2.35) at 15 years or more after surgery. The risk of esophageal adenocarcinoma did not change over time in surgical patients compared with patients who received medication only (5 to <10 years after surgery: HR, 2.02; 95% CI, 1.44-2.84; ≥15 years: HR, 1.80; 95% CI, 1.28-2.54). The risk remained stable over time in analyses restricted to severe reflux disease (5 to <10 years after surgery: HR, 1.81; 95% CI, 1.24-2.63; ≥15 years after surgery: HR, 1.69; 95% CI, 1.14-2.51). Medical and surgical treatment of GERD were associated with a similar reduced esophageal adenocarcinoma risk, with the risk decreasing to the same level as that in the background population over time, supporting the hypothesis that effective treatment of GERD might prevent esophageal adenocarcinoma.