In the past decade, many statistical methods have been proposed for the analysis of case–control genetic data with an emphasis on haplotype-based disease association studies. Most of the methodology has concentrated on the estimation of genetic (haplotype) main effects. Most methods accounted for environmental and gene–environment interaction effects by using prospective-type analyses that may lead to biased estimates when used with case–control data. Several recent publications addressed the issue of retrospective sampling in the analysis of case–control genetic data in the presence of environmental factors by developing efficient semiparametric statistical methods. This article describes the new Stata command haplologit, which implements efficient profile-likelihood semiparametric methods for fitting gene–environment models in the very important special cases of a rare disease, a single candidate gene in Hardy–Weinberg equilibrium, and independence of genetic and environmental factors.