Objective: To compare maternal genotypes between women with and without significant prolongation of pregnancy in the setting of 17-alpha hydroxyprogesterone caproate (17-P) administration for the prevention of recurrent preterm birth (PTB). Design: Case–control. Setting: Three tertiary-care centres across the USA. Population: Women (n = 99) with ≥ 1 prior singleton spontaneous PTB, receiving 17-P. Methods: Women were classified as having successful prolongation of pregnancy during the 17-P treated pregnancy, in two ways: (1) Definition A: success/non-success based on difference in gestational age at delivery between 17-P-treated and untreated pregnancies (success: delivered ≥ 3 weeks later with 17-P) and (2) Definition B: success/non-success based on reaching term (success: delivered at term with 17-P). Main outcome measures: To assess genetic variation, all women underwent whole exome sequencing. Between-group sequence variation was analysed with the Variant Annotation, Analysis, and Search Tool (VAAST). Genes scored by VAAST with P < 0.05 were then analysed with two online tools: (1) Protein ANalysis THrough Evolutionary Relationships (PANTHER) and (2) Database for Annotation, Visualization, and Integrated Discovery (DAVID). Results: Using Definition A, there were 70 women with successful prolongation and 29 without; 1375 genes scored by VAAST had P < 0.05. Using Definition B, 47 women had successful prolongation and 52 did not; 1039 genes scored by VAAST had P < 0.05. PANTHER revealed key differences in gene ontology pathways. Many genes from definition A were classified as prematurity genes (P = 0.026), and those from definition B as pharmacogenetic genes (P = 0.0018); (P, non-significant after Bonferroni correction). Conclusion: A novel analytic approach revealed several genetic differences among women delivering early vs later with 17-P. Tweetable abstract: Several key genetic differences are present in women with recurrent preterm birth despite 17-P treatment.