Aim: Salpingectomy is associated with a lower risk for ovarian cancer, suggesting that the fallopian tubes constitute the origin of the disease. It is unclear whether the observed effect is mediated by pelvic inflammatory disease (PID); a major indication for salpingectomy and implicated in the aetiology of ovarian cancer. Methods: In this population-based cohort study, we used nationwide registry-based data on women exposed for PID with and without subsequent salpingectomy (n Z 97,912) compared with the unexposed population (n Z 5,429,174) between 1973 and 2010. The effect of hormone treatment was considered in a subanalysis. Results: Of the exposed women, 9538 women underwent salpingectomy during the study period. There was a significant association between PID and ovarian cancer (hazard ratio [HR] 1.44, 95% confidence interval [CI] 1.31e1.59), whereas an inverse association was observed for exposed women with subsequent salpingectomy (HR 0.55, 95% CI 0.36e0.83). Salpingectomy performed on other indications (n Z 24,895) was associated with a lower incidence of ovarian cancer (HR 0.72, 95% CI 0.56e0.93). No effect modification was observed for the use of oral contraceptives or hormonal replacement therapy. Conclusion: Salpingectomy is associated with a lower incidence of ovarian cancer regardless of indication.