The association of polymorphic alleles of the apolipoprotein B gene (Insertion/Deletion-, XbaI-, MspI-, EcoRI-, and 3'-VNTR polymorphisms) with variation in lipid concentrations (total cholesterol (T-C), HDL cholesterol (HDL-C), and log-triglycerides (TG)) in plasma was studied in 259 men and 59 women with moderate hypercholesterolemia (T-C 5.5-8.0 mmol/l and TG < 2.5 mmol/l) and ischemic heart disease, especially in relation to the effect of sex and age. The XbaI and the Ins/Del polymorphic alleles were associated with variation in T-C, but only in patients below the 75th percentile for age. The XbaI and Ins/Del polymorphic alleles were synergistically associated with variation in T-C: the X+ and the Del alleles were associated with higher cholesterol concentrations. Younger male patients had the highest frequency of haplotypes including both the X+ and the Del alleles, but the most striking difference was a significantly higher frequency of haplotypes including both the X- and the Ins alleles in female and in older male patients. The heterogeneity of association of polymorphic alleles in the apolipoprotein B gene to complex traits like hypercholesterolemia and ischemic heart disease in this study could explain why in most studies the X+ allele has been associated with higher cholesterol levels, whereas the X- allele has been associated with symptomatic atherosclerosis. The results of our study emphasize the importance of age and sex in measured genotype association studies.