BACKGROUND: There is limited evidence on how diet changes over the transition from primary to secondary school. In this study we investigated changes in diet from age 10 (2007) to age 14 years (2011) and the contribution of school-time consumption and school lunch choice to such changes. METHODS: The 351 participants with dietary data (4 day food record) available at baseline (age 10 years) and follow-up (age 14 years) were included. Multi-level regression models were fitted for absolute or change in food and nutrient intake, cross-classified by primary and secondary school attended as appropriate, with adjustment for covariates and mis-reporting. RESULTS: From age 10 to age 14 years, children decreased energy intake from sugars (-2.6% energy (%E)) (standard error (SE) 0.44) and from saturated fats (-0.54%E (SE 0.18)), decreased fruit (-3.13 g/MJ (SE 1.04)) and vegetables (-1.55 g/MJ (SE 0.46)) consumption and increased sugar sweetened beverage (SSB) (4.66 g/MJ (SE 1.87)) and fries (1.31 g/MJ (SE 0.39)) consumption. Intake of snack foods, SSBs, and fries, but also fruits and vegetables was higher outside school hours. Prospective change from non-school lunch to school lunch, compared to maintaining non-school lunch consumption, was associated with decreased consumption of savoury snacks (-8.32 g/day (SE 2.03)), increased consumption of fries (12.8 g/day (SE 4.01)) and decreased consumption of fruit (-25.16 g/day (SE 11.02)) during school hours. CONCLUSIONS: Changes in diet from age 10 to age 14 years differed within and outside of school hours. Consumption of a school lunch, compared to lunch obtained elsewhere, was associated with negative as well as positive changes in diet, suggesting that any efforts to encourage school lunch take-up need to be accompanied by further efforts to improve school lunch provision to meet nutritional guidelines.The SPEEDY study was funded by the National Prevention Research Initiative (http://www.npri.org.uk) (G0501294), consisting of the following funding partners: British Heart Foundation; Cancer Research UK; Department of Health; Diabetes UK; Economic and Social Research Council; Medical Research Council; Research and Development Office for the Northern Ireland Health and Social Services; Chief Scientist Office, Scottish Executive Health Department; Welsh Assembly Government; and World Cancer Research Fund. This work was also supported by the MRC (Unit Programme numbers MC_UU_12015/3; MC_UU_12015/4; MC_UU_12015/7; U105960389) and the Centre for Diet and Activity Research, a UK Clinical Research Collaboration (UKCRC) Public Health Research Centre of Excellence (RES-590-28-0002; MR/K023187/1). Funding from the British Heart Foundation, Cancer Research UK, Economic and Social Research Council, Medical Research Council, the National Institute for Health Research, and the Wellcome Trust, under the auspices of the UK Clinical Research Collaboration, is gratefully acknowledged. Diet diary data entry was partly funded by the Medical Research Council Human Nutrition Research Centre