Pupils who eat school dinners are just as healthy, if not healthier, than those who eat meals brought in from home, research suggests.
School dinner nutrition has raised concerns in recent months
A team from St George's, University of London, examined 1,000 secondary school pupils across England and Wales.
Their results suggest the best way to improve children's diet may be to focus on the food they are given at home - rather than at school.
The study is published online by the British Medical Journal.
The nutritional content of school dinners has been the subject of much recent public concern, prompted in part by a high profile television series fronted by celebrity chef Jamie Oliver.
The government responded last week by announcing a ban on the sale of so-called junk food in schools.
For the latest study, researchers took all the pupils' height and weight, as well as measures such as waist and hip circumference, skinfold thickness and percentage body fat.
They also noted blood pressure, blood sugar and cholesterol levels, and blood levels of an important vitamin called folate.
Pupils who ate school dinners had lower levels of several risk markers for chronic disease, including blood cholesterol, blood sugar and insulin. Their level of a hormone called leptin, which is associated with fat tissue, was also lower.
These differences held true, even after adjusting for factors such as social class, pubertal status and physical activity.
However, levels of folate - found in foods including spinach, fresh fruit, liver, and yeast - were also lower among pupils eating school dinners.
The authors suggest that the folate content of school dinners should be increased.
Lead researcher Professor Peter Whincup said: "Current efforts to improve the quality of school dinners are to be applauded - the focus on fresh ingredients is welcome as this should increase vitamin intake (including folate).
"However, to improve the diets of British children and adolescents, we need to look beyond school dinners to address overall dietary patterns and their societal determinants."
Claire Williamson, a nutrition scientist at the British Nutrition Foundation, said recent research had shown that many children had low intakes of important nutrients.
"Older children in particular have low intakes of minerals such as calcium, zinc and iron.
"Therefore improvements are needed in most children's diets, whether they bring food from home or eat school lunches."
Ms Williamson said schools not only had a duty to provide healthy food, they must also educate children about the benefits of eating healthily.
Duty of care
Dr Helen Crawley, of the Caroline Walker Trust, which campaigns to raise standards of public nutrition, said poor eating habits were the result of both parental and public influences.
"Whilst children will receive the majority of their food at home, the time children spend in school, nursery, playschemes, camps and other activities will also be influential on both the food choices they are offered and the foods they are exposed to.
"We have a duty of care to ensure that where children are in the care of people other than their parents they are exposed to good eating habits."
Shadow health secretary Andrew Lansley said: "Nothing will work until parents and children understand the advantages of a better diet.
"We need to make healthy food interesting and appealing to eat."