To evaluate the association between the carbohydrate quality index (CQI) and weight change or incident overweight/obesity (body mass index ⩾25 kg/m(2)) in the 'Seguimiento Universidad de Navarra (SUN)' cohort.A total of 8741 participants who were initially free of overweight/obesity were followed up for a median of 7.9 years. We evaluated at baseline the CQI according to four criteria: dietary fiber intake, glycemic index, whole grains/total grains ratio and solid carbohydrates/total carbohydrates ratio. Subjects were classified into quintiles according to CQI. Weight was recorded at baseline and updated every 2 years during follow-up.Increasing CQI of diet was not significantly associated with lower weight gain, although participants in the highest quintile had the lowest average crude weight gain (+211 g/year). We observed 1862 incident cases of overweight/obesity during follow-up. CQI was significantly associated (P for trend 0.006) with a lower risk of overweight/obesity; adjusted odds ratio for the fourth and fifth quintiles were 0.81 (95% confidence interval (CI): 0.66-0.99) and 0.74 (95% CI: 0.60-0.92), respectively.In this Mediterranean cohort, CQI showed a significant inverse association with the incidence of overweight/obesity, which highlights that carbohydrate intake guidelines related to obesity prevention should be focused on improving the CQI of the diet.