Evidence suggests vitamin D has preventive potential in asthma; however, not all children benefit from this intervention. This study aimed to investigate whether variation in the functional 17q21 single nucleotide polymorphism rs12936231 affects the preventive potential of vitamin D against asthma.A combined secondary analysis of two randomised controlled trials of prenatal vitamin D supplementation for the prevention of asthma in offspring (Vitamin D Antenatal Asthma Reduction Trial (VDAART) and Copenhagen Prospective Studies on Asthma in Childhood 2010 (COPSAC2010)) was performed, stratifying by genotype and integrating metabolite data to explore underlying mechanisms.The protective effect of vitamin D on asthma/wheeze was evident among children with the low-risk rs12936231 GG genotype (hazard ratio (HR) 0.49, 95% CI 0.26-0.94, p=0.032) but not the high-risk CC genotype (HR 1.08, 95% CI 0.69-1.69, p=0.751). In VDAART, in the GG genotype vitamin D supplementation was associated with increased plasma levels of sphingolipids, including sphingosine-1-phosphate (β 0.022, 95% CI 0.001-0.044, p=0.038), but this was not evident with the CC genotype, known to be associated with increased expression of ORMDL3 in bronchial epithelial cells. Sphingolipid levels were associated with decreased risk of asthma/wheeze, and there was evidence of interactions between sphingolipid levels, vitamin D and genotype (p-interactionvitaminD*genotype*sphingosine-1-phosphate=0.035). In a cellular model, there was a significant difference in the induction of sphingosine-1-phosphate by vitamin D between a control human bronchial epithelial cell line and a cell line overexpressing ORMDL3 (p=0.002).Results suggest prenatal vitamin D supplementation may reduce the risk of early childhood asthma/wheeze via alterations of sphingolipid metabolism dependent on the 17q21 genotype.