Carbohydrate intolerance and frank diabetes mellitus (DM) are recognised features of cystic fibrosis (CF), but their cause has not been established. Damage to the islet cells due to pancreatic fibrosis is the most common explanation. The relationship between the genotype and the occurrence of diabetes mellitus has been examined in 21 cystic fibrosis patients attending our out-patient chest clinics. DNA samples were tested for the presence of the most common mutation (delta F508) and the results related to the degree of carbohydrate intolerance. We found that in CF patients over 18 years of age diabetes is more frequent among those homozygous for the delta F508 allele than the heterozygotes (P < 0.05). Those homozygous for delta F508 were diagnosed as CF at an earlier age than the heterozygotes (P < 0.05). Both the mean age and the female/male ratio were similar in the diabetic and non-diabetic groups. The prevalence of the delta F508 allele was similar to that expected in a random sample of East Anglian cystic fibrosis patients. These data suggest that the occurrence of diabetes mellitus in patients with cystic fibrosis is related to the genotype, which could be secondary to the way the genetic factors influence the degree of pancreatic disease and its rate of progression.