The aim of this study was to identify subgroups of patients for whom the interactions among clinical, socioeconomic, and care-related factors determine a substantial increase in the risk of developing long-term diabetic complications. We performed a case-control study aimed at identifying and quantifying the risk factors for the development of major diabetic complications (eye, renal, and lower limb complications) in type 1 and type 2 diabetic patients. A total of 886 patients with renal, eye, or lower limb complications and 1,888 control subjects were enrolled in 35 diabetes outpatient clinics and 49 general practitioners' offices in 17 out of the 20 Italian regions. The main results were obtained using recursive partitioning and amalgamation (RECPAM), a technique that attempts to integrate the advantages of main effect logistic regression and tree-growing. The application of RECPAM led to the detection of important interactions involving clinical, socioeconomic, and care-related characteristics and allowed the identification of internally homogeneous subgroups characterized by a marked difference in the risk of developing major complications. In type 1 diabetic patients, the interaction between hypertension and smoking habits led to a dramatic increase in the complication risk, while in type 2 diabetic subjects, a poor compliance with visit scheduling was the most important predictor of complications. Furthermore, a marked difference in the risk profile was associated with patient characteristics (age, years of education, occupation). In the definition of the risk profile for each individual patient, socioeconomic status and level of education need to be taken under serious consideration, since they can determine a complication risk not dissimilar from hard clinical variables, such as hypertension and diabetes duration. Specific educational interventions, targeted to the socially disadvantaged strata of the population, need to be designed and implemented.