STUDY QUESTIONIs the length of the anogenital distance (AGD), a biomarker of the in-utero prenatal hormonal environment, associated with the presence of endometriomas and deep infiltrating endometriosis (DIE)?SUMMARY ANSWERShorter AGD is associated with presence of endometriomas and DIE.WHAT IS KNOWN ALREADYIt is debated whether hormonal exposure to estrogens in utero may be a risk factor for endometriosis in adulthood. AGD is a biomarker of prenatal hormonal environment and observational studies have shown an association between AGD and reproductive parameters in both sexes.STUDY DESIGN, SIZE, DURATIONThis case–control study of 114 women with endometriosis (endometriomas and/or DIE) and 105 controls was conducted between September 2014 and May 2015.PARTICIPANTS/MATERIALS, SETTING, METHODSCases were attending the Endometriosis Unit of the Hospital. Prevalent as well as incident cases, diagnosed by transvaginal ultrasound (TVUS), were included. Controls were women without endometriosis attending the gynecological outpatient clinic for routine gynecological exams. Participants completed health questionnaires, followed physical and gynecological examinations, including TVUS. Measurements from the anterior clitoral surface to the upper verge of the anus (AGDAC), and from the posterior fourchette to the upper verge of the anus (AGDAF) were obtained in all subjects. Unconditional multiple logistic regression was used to estimate the association between AGD measurements and presence of endometriomas and/or DIE while accounting for important confounders and covariates, including age, body mass index, vaginal delivery or episiotomy.MAIN RESULTS AND THE ROLE OF CHANCEAGDAF was related to presence of endometriomas and/or DIE. For all cases of endometriosis (endometriomas and DIE), women in the lowest tertile of the AGDAF distribution, compared with the upper tertile, were 7.6-times (95% CI 2.8–21.0; P-trend < 0.001) more likely to have endometriosis. With regard to DIE, women with AGDAF below the median, compared with those with AGDAF above the median, were 41.6-times (95% CI 3.9–438; P-value = 0.002) more likely to have endometriosis.LIMITATIONS, REASONS FOR CAUTIONIn case–control studies, information and selection bias has to be ruled out. Physicians conducting the measurement were blind to the status of the patients. Controls came from the same population as the cases. We adjusted for known and suspected confounders and covariates, but the possibility of residual confounding or chance findings should always be considered. As with all observational studies, causal inference is limited.WIDER IMPLICATIONS OF THE FINDINGSThis study suggests that endometriosis, especially the DIE, might have a prenatal origin that may be traced back to the hormonal milieu in which the fetus develops.STUDY FUNDING/COMPETING INTERESTThis work was supported by the Ministry of Economy and Competitiveness, ISCIII (AES), grant no. PI13/01237 and the Seneca Foundation, Murcia Regional Agency of Science and Technology, grant no. 19443/PI/14. The authors have no competing interests to declare.TRIAL REGISTRATION NUMBERNot applicable.