The results come from the first large national look at the effectiveness of the state laws over time. They are not a slam-dunk, and even obesity experts who praised the study acknowledge the measures are a political hot potato, smacking of a "nanny state" and opposed by industry and cash-strapped schools relying on food processors' money.
But if the laws have even a tiny effect, "what are the downsides of improving the food environment for children today?" asked Dr. David Ludwig, an obesity specialist at Harvard Medical School and Boston Children's Hospital. "You can't get much worse than it already is."
Children in the study gained less weight from fifth through eighth grades if they lived in states with strong, consistent laws versus no laws governing snacks available in schools. For example, kids who were 5 feet tall and 100 pounds gained on average 2.2 fewer pounds if they lived in states with strong laws in the three years studied.
Also, children who were overweight or obese in fifth grade were more likely to reach a healthy weight by eighth grade if they lived in states with the strongest laws.
The effects weren't huge, and the study isn't proof that the laws influenced kids' weight. But the results raised optimism among obesity researchers and public health experts who generally applaud strong laws to get junk food out of schools.
"This is the first real evidence that the laws are likely to have an impact," said Dr. Virginia Stallings, director of the nutrition center at Children's Hospital of Philadelphia. Stallings chaired an Institute of Medicine panel that urged standards for making snack foods and drinks sold in schools more healthful but was not involved in the new research.
The authors of the study, released online Monday in the journal Pediatrics, analyzed data on 6,300 students in 40 states. Their heights and weights were measured in spring 2004, when they were finishing fifth grade and soon to enter middle school, and in 2007, during the spring of eighth grade.
The researchers also examined several databases of state laws on school nutrition during the same time. The states were not identified in the study because of database license restrictions that protect the students' confidentiality, the authors said.
The laws governed food and drinks sold in public school vending machines and school stores, outside of mealtime. Laws were considered strong if they included specific nutrition requirements, such as limits on sugar and fats. Laws were rated weak if the requirements were vague and merely urged sales of "healthy" food without specifics.
The results show that for these laws to be effective, they need to be consistently strong in all grades, said lead author Daniel Taber, a health policy researcher at the University of Illinois at Chicago.
In late 2003, 27 of the states studied had no relevant laws affecting middle-schoolers, seven had weak laws and six had strong laws. Several states and school districts enacted tougher laws affecting middle-schoolers and younger kids during the next few years as national concern rose over obesity rates.
Recent data suggest that almost 20 percent of elementary school children nationwide are obese, and the rate among teens is only slightly lower.
In states with consistently strong laws in elementary and middle school, almost 39 percent of fifth-graders were overweight when the study began. That fell to 34 percent in eighth grade. Also, almost 21 percent of fifth-graders were obese, declining to about 18 percent in the eighth grade.
In states with no relevant laws, almost 37 percent of fifth-graders were overweight and 21 percent were obese, and those numbers barely budged by eighth grade.
Boston University statistician Mark Glickman said the study design makes it difficult to reach any convincing conclusions. It's possible, for example, that stronger laws might be more prevalent in Democratic-leaning states with better-educated residents, and less obesity. But the study authors said they found stronger laws in states that had high levels of obesity.
The authors accounted for gender, race, income and school location.
Taber noted that several Southern states have been the most aggressive at targeting school junk food, "probably because they have the highest rates of obesity."
Ludwig, the Boston obesity specialist, praised the researchers for trying to "tackle a complicated question."
"The challenge is that there are a great many factors that coalesce to influence body weight," Ludwig said. "Disentangling these influences and looking at the independent effects of just one is a methodological nightmare."