STUDY QUESTION Can we identify patient characteristics that distinguish which ovulatory infertile women undergoing hysterosalpingography (HSG) benefit more or less from flushing with oil-based contrast medium compared to water-based contrast medium? SUMMARY ANSWER In ovulatory infertile women, HSG with oil-based contrast medium resulted in higher 6-month ongoing pregnancy and live birth rates as compared to HSG with water-based contrast medium and this treatment effect was independent of characteristics of the couple. WHAT IS KNOWN ALREADY We recently showed that in infertile women undergoing HSG, flushing with oil-based contrast medium resulted in more ongoing pregnancies than flushing with water-based contrast medium. STUDY DESIGN SIZE DURATION We used data from our randomized clinical trial (RCT) in which 1,119 ovulatory infertile women undergoing HSG during fertility work-up were randomized for use of oil-based (N = 557) or water-based (N = 562) contrast medium. PARTICIPANTS/MATERIALS SETTING METHODS We built logistic regression models to predict ongoing pregnancy and live birth (secondary outcome) as a function of the specific contrast, the specific marker, and marker-by-contrast-interaction. Markers considered were female age, maternal ethnicity, female smoking, body mass index (BMI), duration of infertility, infertility being primary or secondary, sperm quality, and previous appendectomy. MAIN RESULTS AND THE ROLE OF CHANCE The 6-month ongoing pregnancy rates in the overall population were 39.7% after use of oil-based contrast versus 29.1% after use of water-based contrast medium [relative risk (RR), 1.37; 95% confidence interval (CI), 1.16-1.61; P 3 ml [RR, 1.77; 95% CI, 1.28-2.46; P = 0.02]. Also, in women who smoked, the treatment effect of flushing with oil was stronger, but this interaction did not reach statistical significance (P = 0.066). We found no positive effect of oil-based contrast in obese women. We found similar but weaker associations for live birth, which was probably due to lower number of events resulting in less power. LIMITATIONS REASONS FOR CAUTION The RCT was restricted to infertile ovulatory women younger than 39 years of age without endocrinological disorders and at low risk for tubal pathology. Our results should not be generalized to infertile women who do not share these features. WIDER IMPLICATIONS OF THE FINDINGS All infertile, ovulatory women younger than 39 years with a low risk for tubal pathology will benefit from an HSG with oil-based contrast; therefore, this should be offered to them after fertility work-up. STUDY FUNDING/COMPETING INTERESTS The original H2Oil RCT was an investigator-initiated study that was funded by the two academic institutions (AMC and VUmc) of the Amsterdam UMC. The study displayed in this paper was funded by an unconditional research grant from Guerbet. B.W.M. is supported by an NHMRC Practitioner Fellowship (GNT1082548). K.D. reports consultancy for Guerbet, during the conduct of the study, and also reports research grants from Guerbet. C.B.L. reports grants from Guerbet, during the conduct of the study, and grants from Ferring, grants from Merck, and personal fees from Ferring, outside the submitted work. P.H. reports grants from Guerbet, during the conduct of the study, and grants from Ferring and Merck, outside the submitted work. V.M. reports receiving travel and speakers fee as well as research grants from Guerbet. B.W.M. reports consultancy for ObsEva, Merck, Merck KGaA, and Guerbet, and research grants from Guerbet and Merck. The other authors have no conflict of interest to declare. TRIAL REGISTRATION NUMBER NTR 3270 www.trialregister.nl. TRIAL REGISTRATION DATE 1 February 2012. DATE OF FIRST PATIENT’S ENROLMENT 3 February 2012.