Background: Early-life exposure to cats and dogs has shown diverging associations with childhood asthma risk, and gene-environment interaction is one possible explanation. Objectives: We investigated interactions between cat and dog exposure and single nucleotide polymorphism rs7216389 variants in the chromosome 17q21 locus, the strongest known genetic risk factor for childhood asthma. Methods: Genotyping was performed in 377 children from the at-risk Copenhagen Prospective Studies on Asthma in Childhood2000. The primary end point was the development of asthma until age 12 years. The secondary end point was the number of episodes with pneumonia and bronchiolitis from 0 to 3 years of age. Exposures included cat and dog ownership from birth and cat and dog allergen levels in bedding at age 1 year. Replication was performed in the unselected COPSAC2010 cohort with follow-up until 5 years of age. Results: Cat and/or dog exposure from birth was associated with a lower prevalence of asthma among children with the rs7216389 high-risk TT genotype (adjusted hazard ratio, 0.16; 95% CI, 0.04-0.71; P =.015), with no effect in those with the CC/CT genotype (adjusted P =.283), demonstrating interaction between cat and dog exposure and the rs7216389 genotype (adjusted P =.044). Cat allergen levels were inversely associated with asthma development in children with the TT genotype (adjusted hazard ratio, 0.83; 95% CI, 0.71-0.97; P =.022), supporting the cat–rs7216389 genotype interaction (adjusted P =.008). Dog allergen exposure did not show such interaction. Furthermore, the TT genotype was associated with higher risk of pneumonia and bronchiolitis, and this increased risk was likewise decreased in children exposed to cat. Replication showed similar effects on asthma risk. Conclusion: The observed gene-environment interaction suggests a role of early-life exposure, especially to cat, for attenuating the risk of childhood asthma, pneumonia, and bronchiolitis in genetically susceptible subjects.