To assess patient, doctor, practice, and process of care variables for their effect on glycaemic control in diabetes mellitus, and to quantify their relative effects. Search of general practice medical records, patient questionnaires and examination, doctor questionnaire, videotaping and analysis of consultations, and practice questionnaire. 12 practices with 32 participating general practitioners in Nottinghamshire. 318 patients randomly selected from those with diabetes in each practice, 10 for each participating doctor. Glycaemic control as measured by random glycated haemoglobin A1c estimation (random haemoglobin A1 measurement). Glycaemic control was significantly related to the disease process as measured by years since diagnosis, treatment group, and number of diabetes related clinical events. Females had significantly worse control than males. Other patient factors, such as age, social class, lifestyle, attitudes, satisfaction, and knowledge, had no association with glycaemic control. Of all the doctor factors examined, only doctors who professed a special interest in diabetes achieved significantly better glycaemic control. Bigger and better equipped practices and those with a diabetic miniclinic had patients with significantly better glycaemic control, as did those with access to dietetic advice. Patients attending hospital clinics had worse glycaemic control, but this seemed to be attributable to the case mix and practice characteristics. Shared care did not contribute to the multiple linear regression model. Glycaemic control among diabetic patients in the community is related to such factors as treatment group, sex, and years since diagnosis; it is also related to the organisation and process of care. The findings support concentrating diabetic care on partners with special interests in diabetes in well equipped practices with adequate dietetic support.