OBJECTIVE: Whereas the relationship between some components of diet, such as n-3 fatty acids and B-vitamins, and depression risk has been extensively studied, the role of fast-food or processed pastries consumption has received little attention. DESIGN: Consumption of fast food (hamburgers, sausages, pizza) and processed pastries (muffins, doughnuts, croissants) was assessed at baseline through a validated semi-quantitative FFQ. Participants were classified as incident cases of depression if they reported a physician diagnosis of depression or the use of antidepressant medication in at least one of the follow-up questionnaires. Cox regression models were fit to assess the relationship between consumption of fast food and commercial baked goods and the incidence of depression. SETTING: The SUN (Seguimiento Universidad de Navarra - University of Navarra Follow-up) Project, Spain. SUBJECTS: Participants (n 8964) from a Spanish cohort. RESULTS: After a median follow-up of 6·2 years, 493 cases of depression were reported. A higher risk of depression was associated with consumption of fast food (fifth (Q5) v. first quintile (Q1): hazard ratio (HR) = 1·36; 95 % CI 1·02, 1·81; P trend = 0·003). The results did not change after adjustment for the consumption of other food items. No linear relationship was found between the consumption of commercial baked goods and depression. Participants belonging to consumption quintiles Q2-Q5 showed an increased risk of depression compared with those belonging to the lowest level of consumption (Q1; HR = 1·38; 95 % CI 1·06, 1·80). CONCLUSIONS: Fast-food and commercial baked goods consumption may have a detrimental effect on depression risk.